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 | for-7 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/gomp/for-7.C | 437 | utf_8 | e49df5fcbf0633c005baec65accb788b | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
extern void bar(int);
void foo (int n)
{
int i;
#pragma omp for schedule(static) ordered
for (i = 0; i < n; ++i)
bar(i);
}
/* { dg-final { scan-tree-dump-times "GOMP_loop_ordered_static_start" 1 "ompexp" } } */
/* { dg-final { scan... |
google | chromium | for-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/gomp/for-4.C | 416 | utf_8 | 267f636c6e44565ab5681b6144cb7f54 | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
extern void bar(int);
void foo (int n)
{
int i;
#pragma omp for schedule(dynamic)
for (i = 0; i < n; ++i)
bar(i);
}
/* { dg-final { scan-tree-dump-times "GOMP_loop_dynamic_start" 1 "ompexp" } } */
/* { dg-final { scan-tree-dump-tim... |
google | chromium | atomic-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/gomp/atomic-1.C | 1,454 | utf_8 | 450622eac3970da63e43723374af5da7 | /* { dg-do compile } */
int x;
volatile int y;
volatile unsigned char z;
void f1(void)
{
#pragma omp atomic
x++;
#pragma omp atomic
x--;
#pragma omp atomic
++x;
#pragma omp atomic
--x;
#pragma omp atomic
x += 1;
#pragma omp atomic
x -= y;
#pragma omp atomic
x |= 1;
#pragma ... |
google | chromium | for-8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/gomp/for-8.C | 440 | utf_8 | a35cf4f936644b5398fd274886e1f37c | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
extern void bar(int);
void foo (int n)
{
int i;
#pragma omp for schedule(dynamic) ordered
for (i = 0; i < n; ++i)
bar(i);
}
/* { dg-final { scan-tree-dump-times "GOMP_loop_ordered_dynamic_start" 1 "ompexp" } } */
/* { dg-final { sc... |
google | chromium | method-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/gomp/method-1.C | 221 | utf_8 | 40ddfb4cf46a4ea2a28ece501a9d1b2b | /* PR c++/24513 */
/* { dg-do compile } */
struct S
{
void foo (int *p)
{
#pragma omp parallel for
for (int i = 0; i < 1000; ++i)
p[i]=0;
}
void bar ()
{
#pragma omp master
j = 2;
}
int j;
};
|
google | chromium | crossjump1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/crossjump1.C | 481 | utf_8 | 365a9a74302377cb0e82e7f5f1a7bca9 | // This testcase failed on s390, because cross-jumping merged 2 calls,
// one with REG_EH_REGION note with no handlers (ie. termination)
// and one without REG_EH_REGION note.
// { dg-do run }
// { dg-options "-O2" }
#include <exception>
#include <string>
struct E : public std::exception
{
std::string m;
E () : m... |
google | chromium | comdat1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/comdat1.C | 726 | utf_8 | 5a4cb3c8d739e6d9bde39ba9bebd19e2 | // PR target/29487
// { dg-do link }
// { dg-options "-O2" }
/* This function is not defined. The compiler should optimize away
all calls to it. */
extern void undefined () throw ();
extern void f1();
inline void f2() {
f1();
}
/* This function will be COMDAT if not inlined. */
inline void f1() {}
/* This ... |
google | chromium | table | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/table.C | 333 | utf_8 | 22d4b256b3f06b5f0d589c600aba29e4 | // { dg-do compile { target *-*-darwin* } }
// { dg-final { scan-assembler "GCC_except_table0" } }
void needed();
void unneeded();
class Bar
{
public:
Bar() {}
virtual ~Bar() {}
void unneeded();
};
void needed()
{
Bar b;
}
//#if 0
void unneeded()
{
Bar b;
b.unneeded();
}
//#endif
int main()
{
needed();
... |
google | chromium | scope1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/scope1.C | 728 | utf_8 | 10cee1522872b7a635448041c93abb77 | // Test that we've scoped the destructor properly for variables declared
// in a conditional.
// { dg-do run }
extern "C" void abort ();
class C
{
bool live;
public:
C();
C(const C &);
~C ();
operator bool() const;
};
void f1 ()
{
while (C br = C()) abort ();
}
void f2 ()
{
for (; C br = C(); ) abort... |
google | chromium | cleanup2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cleanup2.C | 555 | utf_8 | 39018f18e1fc86801376affc388c0539 | // PR c++/12491
// { dg-do compile }
// { dg-options "-O2" }
// The return statements are necessary to trigger this bug.
class Object
{
public:
virtual ~Object (void) { return; }
};
class AutoPtr
{
public:
~AutoPtr (void) { delete m_rep; return; }
private:
const Object *m_rep;
};
class Handle
{
public:
~Han... |
google | chromium | ia64-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/ia64-2.C | 1,069 | utf_8 | 770672d287d134821ae3d85a07f18e95 | // PR target/30230
// This testcase failed on IA-64, where end of an EH region ended
// in the middle of a bundle (with br.call insn in first or second
// slot of .bbb/.mbb bundles and EH region end right after it).
// But br.call returns to the start of the next bundlem so during
// unwinding the call was considered t... |
google | chromium | elide2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/elide2.C | 412 | utf_8 | cff2161ef40bce6a9bb0205f7ce68baa | // PR c++/13944
// Verify that we still call terminate() if we do run the copy constructor,
// and it throws.
// { dg-do run }
#include <cstdlib>
#include <exception>
struct A
{
A() { }
A(const A&) { throw 1; }
};
A a;
void
good_terminate() { std::exit (0); }
int main()
{
std::set_terminate (good_terminate... |
google | chromium | catch5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/catch5.C | 195 | utf_8 | 887ec475679c71652cd3556b0b9af2f3 | // PR c++/31411
struct allocator{
~allocator() throw();
};
struct string
{
string(const string& str, const allocator& al = allocator());
};
int main() {
try {}
catch (string smess) {}
}
|
google | chromium | uncaught1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/uncaught1.C | 1,269 | utf_8 | 82da5127d5ab16e1719d0acbdd8dc675 | // PR libstdc++/10606
// { dg-do run }
// { dg-options "-fuse-cxa-get-exception-ptr" { target powerpc*-*-darwin* } }
#include <exception>
#include <cstdlib>
struct Check {
int obj1, obj2;
bool state;
};
static Check const data[] = {
{ 0, 0, false }, // construct [0]
{ 1, 0, true }, // [1] = [0]
{ 0, 0, t... |
google | chromium | ctor1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/ctor1.C | 461 | utf_8 | 86be24a4005519ed1d807d772b94a617 | // { dg-do run }
// PR 411
bool was_f_in_Bar_destroyed=false;
struct Foo
{
~Foo()
{
was_f_in_Bar_destroyed=true;
}
};
struct Bar
{
~Bar()
{
throw 1;
}
Foo f;
};
int main()
{
try
{
Bar f;
}
catch(int i)
{
if(was_f_in_Bar_destroyed)
{
return 0;
}
}
return 1... |
google | chromium | dead1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/dead1.C | 262 | utf_8 | e917a91ae5be207defc427d0a079f7e9 | // PR 6320
// Rechained the MUST_NOT_THROW region in the wrong order wrt the
// TRY/CATCH while removing them and got confused.
// { dg-do compile }
struct S {
~S();
};
void foo()
{
try {
return;
}
catch (int) {
}
catch (...) {
S s;
}
}
|
google | chromium | spec9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec9.C | 200 | utf_8 | cc74f2602629e512eb9cbe673c7ea024 | // PR c++/15745
// { dg-do run }
typedef int IntArray[10];
IntArray i;
void test_array() throw (IntArray)
{
throw i;
}
int main ()
{
try
{
test_array();
}
catch (IntArray) {}
}
|
google | chromium | registers1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/registers1.C | 3,190 | utf_8 | a9ed8d0335c982c533cb9ab886ed3a49 | // Try to check that registers are preserved when the stack is unwound.
// { dg-do run }
// { dg-options -O2 }
extern "C" void exit(int);
extern "C" void abort();
// This test case triggers up to DEPTH recursive calls to function
// foo(), These calls are numbered so that 0 is the innermost, 1 the
// second innermost... |
google | chromium | async-unwind2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/async-unwind2.C | 3,865 | utf_8 | b180c4cbd744b4345911f45edb9f6f65 | // PR rtl-optimization/36419
// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
// { dg-options "-Os -fasynchronous-unwind-tables -fpic -fno-inline" }
#include <stdarg.h>
extern "C" void abort ();
extern "C"
{
struct R { int r1; unsigned short r2[1]; };
int bar1 (unsigned short *, int, short) throw ()... |
google | chromium | builtin3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/builtin3.C | 387 | utf_8 | 112da3aa0c7ef9523c0dd0427c299ca2 | // Without explicit prototype, we need to assume the builtin can
// throw for builtins that at least on one platform can throw.
// { dg-do compile }
// { dg-options "-fdump-tree-eh" }
struct A { A (); ~A (); int i; };
int
bar ()
{
A a;
__builtin_printf ("foo %d\n", a.i);
}
/* { dg-final { scan-tree-dump-times "r... |
google | chromium | filter2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/filter2.C | 627 | utf_8 | 12090d44df12e33d62fc4a9cf4bcd257 | // Test that terminate gets run when a catch filter fails to match while
// running destructors. Original bug depended on a::~a being inlined.
// { dg-do run }
// { dg-options -O }
#include <exception>
#include <cstdlib>
struct e1 {};
struct e2 {};
struct a
{
a () { }
~a ()
{
try
{
throw e1();
}... |
google | chromium | forced3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/forced3.C | 1,241 | utf_8 | c881a898475d015805bd536ce3074679 | // HP-UX libunwind.so doesn't provide _UA_END_OF_STACK.
// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that forced unwinding calls std::unexpected going
// throw a nothrow function.
#include <unwind.h>
#include <stdlib.h>
#include <exception>
#include <string.h>
static _Unwind_Reason_Code
force_unwind_stop (... |
google | chromium | init-temp1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/init-temp1.C | 537 | utf_8 | b0023f25e301d07afcde44fcd606a148 | // PR c++/15764
extern "C" void abort ();
int counter = 0;
int thrown;
struct a {
~a () { if (thrown++ == 0) throw 42; }
};
int f (a const&) { return 1; }
int f (a const&, a const&) { return 1; }
struct b {
b (...) { ++counter; }
~b () { --counter; }
};
bool p;
void g()
{
if (p) throw 42;
... |
google | chromium | ehopt1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/ehopt1.C | 665 | utf_8 | b8f0f8226fe799bdbefac986e559eb73 | // into the following try block, so we lost its destructor call.
// { dg-do run }
template <class T, class U>
class A;
bool b;
int count;
template <>
class A<int, int>
{
public:
A(int) { ++count; if (b) throw 1; }
A(const A&) { ++count; if (b) throw 1; }
~A() { --count; if (b) throw 1; }
};
typedef A<int, int> B;... |
google | chromium | fp-regs | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/fp-regs.C | 1,556 | utf_8 | 2fa97d2eb1070b8ff9ed142189631d04 | // PR 20670: f29 corrupted when unwind stack. This tries to test that FP
// registers are properly saved and restored by defining 20 different FP
// local variables.
// { dg-do run }
// { dg-options "-O" }
#include <stdlib.h>
double zero = 0.0;
double another_zero = 0.0;
int
sub (void)
{
throw (0);
}
int
main ... |
google | chromium | spec2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec2.C | 319 | utf_8 | d6ea4980c486b9a221bda79100d54cda | // { dg-do compile }
struct S { void f (void); };
typedef void f1 (void) throw (int); // { dg-error "exception" }
typedef void (*f2) (void) throw (int); // { dg-error "exception" }
typedef void (S::*f3) (void) throw (int); // { dg-error "exception" }
void (*f4) (void) throw (int);
void (S::*f5) (void) throw (int);
|
google | chromium | cleanup1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cleanup1.C | 36,935 | utf_8 | 9c84af759e7a0280e3b2d6a8cc5f8716 | struct vector { ~vector(); };
struct C { C();
vector x; };
struct A {
A();
typedef C T;
T a0000; T a0001; T a0002; T a0003; T a0004; T a0005; T a0006; T a0007; T a0008; T a0009;
T a0010; T a0011; T a0012; T a0013; T a0014; T a0015; T a0016; T a0017; T a0018; T a0019;
T a0020; T a0021; ... |
google | chromium | cleanup5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cleanup5.C | 350 | utf_8 | aa6038fb3f955b6019e1a056cca60f0c | // PR 17907
// { dg-do compile }
// { dg-options "" }
// We lost a CLEANUP_POINT_EXPR, leading to a crash destroying temp of A.
struct String {
~String();
int size() const;
};
struct CodingSystem {
String convertOut() const;
};
void inputOpened(CodingSystem *outputCodingSystem)
{
char filePath[outputCodingSy... |
google | chromium | omit-frame-pointer | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/omit-frame-pointer.C | 229 | utf_8 | ee5fb539eb5e41ab9f5aa0028f011fce | // { dg-do run }
// { dg-options -fomit-frame-pointer }
#include <iostream>
class Bug
{
};
int throw_bug()
{
throw Bug();
return 0;
}
int main()
{
try {
std::cout << throw_bug();
} catch (Bug bug) {
};
return 0;
}
|
google | chromium | weak1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/weak1.C | 567 | utf_8 | 6cee1c23f0666712b8cdd5e226b7e4c7 | // PR target/29487
// { dg-do run { xfail { hppa*-*-hpux* && { ! hppa*64*-*-* } } } }
// { dg-require-weak-override "" }
// { dg-additional-sources "weak1-a.cc" }
// { dg-options "-O2" }
extern __attribute__((weak))
void f() {
}
int main () {
try {
f();
return 1;
} catch (int i) {
/* Although the imp... |
google | chromium | spec7 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec7.C | 646 | utf_8 | 0ed10d4eaed0fa08f433fa3337b432a9 | // PR 14535
// { dg-do run }
// { dg-options "-O -finline" }
//
// Original test case failure required that Raiser constructor be inlined.
extern "C" void abort();
bool destructor_called = false;
struct B {
virtual void Run(){};
};
struct D : public B {
virtual void Run()
{
struct O {... |
google | chromium | synth1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/synth1.C | 414 | utf_8 | f51a05dd556d82ff2c27ab64681114bb | // PR c++/6179
// Bug: we tried to look at the fields of 'const A' to determine the proper
// exception specification for the synthesized copy constructor, but
// TYPE_FIELDS hadn't been set yet, so we incorrectly got a throw() spec.
struct B
{
B () {}
B (const B&) { throw 1; }
};
struct A;
void f (const A &) {}... |
google | chromium | spec1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec1.C | 147 | utf_8 | 82939fb6cdaf944681687fca28788638 | // Check that we allow an exception specification on a reference-to-function.
// { dg-do compile }
void f () throw ();
void (&fp)() throw () = f;
|
google | chromium | forced1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/forced1.C | 1,588 | utf_8 | b9e40a9f396b0f5897d9a01a383448d0 | // HP-UX libunwind.so doesn't provide _UA_END_OF_STACK.
// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that forced unwinding runs all cleanups. Also tests that
// rethrowing doesn't call the exception object destructor.
#include <unwind.h>
#include <stdlib.h>
#include <string.h>
static int test = 0;
static ... |
google | chromium | nrv1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/nrv1.C | 268 | utf_8 | 02bc77a36c6c86bb6c3fa9d05ed2ca11 | // PR c++/5636
// Bug: the named return value optimization interfered with EH cleanups.
int c, d;
struct A
{
A() { ++c; }
~A() { ++d; }
};
A f()
{
A nrv;
throw 42;
return nrv;
}
int main()
{
try
{ A a = f(); }
catch (...) { }
return (d < c);
}
|
google | chromium | synth2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/synth2.C | 244 | utf_8 | f0d76e8f2c70435a893be36ce22b7b72 | // PR c++/24580
// { dg-do run }
struct vbase {};
struct foo : virtual vbase
{
foo()
{
throw "exception in foo ctor";
}
};
struct bar : public foo {};
int main()
{
try
{
bar a;
}
catch ( ... ) { }
return 0;
}
|
google | chromium | builtin2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/builtin2.C | 512 | utf_8 | a2a80d248b1f33314f034dccdc5cf0fc | // Verify that if explicit prototype for builtin is present with throw(),
// neither the normal builtin nor __builtin_* variant can throw exceptions.
// { dg-do compile }
// { dg-options "-fdump-tree-eh" }
extern "C" int printf (const char *, ...) throw();
struct A { A (); ~A (); int i; };
int
foo ()
{
A a;
prin... |
google | chromium | spec5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec5.C | 277 | utf_8 | af93b2c9f583eec05b65da9de92c3d47 | // Test for extension to allow incomplete types in an
// exception-specification for a declaration.
// { dg-do run }
// { dg-options "-fpermissive -w" }
struct A;
struct B
{
void f () throw (A);
};
struct A {};
void B::f () throw (A) {}
int main ()
{
B b;
b.f();
}
|
google | chromium | builtin4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/builtin4.C | 248 | utf_8 | d600e61118e165a8544e4a21e24396b0 | // PR c++/33289
// { dg-do compile }
typedef __SIZE_TYPE__ size_t;
extern "C" int __sprintf_chk (char *__restrict, int, size_t, const char *, ...) throw ();
extern "C" int __sprintf_chk (char *__restrict, int, size_t, const char *, ...) throw ();
|
google | chromium | gcsec1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/gcsec1.C | 616 | utf_8 | 08684655cbbdb7a5f4f96546c22535c1 | /* PR other/29639 */
/* AIX gld supports garbage collection. But AIX gcc does not support
-ffunction-sections or -fdata-sections. */
/* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */
/* { dg-require-gc-sections "" } */
/* { dg-options "-ffunction-sections -Wl,--gc-sections" } */
extern "C" void abort (v... |
google | chromium | unexpected1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/unexpected1.C | 478 | utf_8 | 1ff41980dd5d1398018fd0852361341a | // PR 3719
// Test that an unexpected handler can rethrow to categorize.
// { dg-do run }
#include <exception>
extern "C" void abort ();
struct One { };
struct Two { };
static void
handle_unexpected ()
{
try
{
throw;
}
catch (One &)
{
throw Two ();
}
}
static void
doit () throw (Two)
{
throw ... |
google | chromium | goto1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/goto1.C | 334 | utf_8 | fa7c4733d09d80ea62bb08bcfe896fbb | extern "C" void abort ();
static int count;
struct S {
S() { ++count; }
~S() { --count; }
};
int foo(int p)
{
S s1;
{
S s2;
if (p)
goto L;
else
return 1;
}
foo (p);
L:
return 0;
}
int main()
{
foo(0);
if (count != 0)
abort ();
foo(1);
if (count != 0)
abort ();
... |
google | chromium | subreg-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/subreg-1.C | 707 | utf_8 | 0293d33cc6e81e9a845dd2e5cbbbe43d | /* The lower-subreg pass would ICE on this test case with
TODO_verify_flow on 32-bit PowerPC. It didn't handle REG_EH_REGION
notes correctly. This is reduced from interpret.cc in libjava. */
/* { dg-do compile } */
/* { dg-options "-O2 -fnon-call-exceptions" } */
union _Jv_word
{
double *o;
int i;
int ... |
google | chromium | uncaught3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/uncaught3.C | 1,310 | utf_8 | 794cca1303d30d70c6d5c47c972e23a7 | // { dg-do compile { target powerpc*-*-darwin* } }
// { dg-final { scan-assembler-not "__cxa_get_exception" } }
// { dg-options "-mmacosx-version-min=10.4" }
#include <exception>
#include <cstdlib>
struct Check {
int obj1, obj2;
bool state;
};
static Check const data[] = {
{ 0, 0, false }, // construct [0]
... |
google | chromium | builtin1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/builtin1.C | 530 | utf_8 | 4cca6e6571ce2b5158dfe743bd1ce881 | // Verify that if explicit prototype for builtin is present without throw(),
// both the normal builtin and __builtin_* variant are expected to be
// able to throw exceptions.
// { dg-do compile }
// { dg-options "-fdump-tree-eh" }
extern "C" int printf (const char *, ...);
struct A { A (); ~A (); int i; };
int
foo ... |
google | chromium | 080514-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/080514-1.C | 321 | utf_8 | 99f14d5ed8c140b0a7c970bb12a4c5f0 | // This used to fail on s390 due to cse removing an insn with a
// REG_EH_REGION without deleting the EH edge.
// { dg-do compile }
// { dg-options "-O2 -fnon-call-exceptions" }
void
run (int m, double d)
{
int stack[m];
int *sp = stack;
if (d == 1.0)
*(sp++) = (0);
else if (d < 1.0)
*(sp++) = (-1);
}... |
google | chromium | stabilize | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/stabilize.C | 523 | utf_8 | 7c9d2a4fef98319bfc85567c627c041c | // PR c++/8186
// Bug: In f, convert_for_arg_passing wrapped the A TARGET_EXPR in an
// ADDR_EXPR for passing by invisible ref. stabilize_throw_expr copied the
// resulting pointer into a temporary. cp_convert_parm_for_inlining then
// dereferences it and tries to initialize B::am with the INDIRECT_REF,
// which cal... |
google | chromium | spec3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec3.C | 283 | utf_8 | 7823eff4e33eebdc8a1d73389e14e7a7 | // PR c++/4381
// Test that exception-specs work properly for classes with virtual bases.
// { dg-do run }
class Base {};
struct A : virtual public Base
{
A() {}
};
struct B {};
void func() throw (B,A)
{
throw A();
}
int main(void)
{
try { func(); }
catch (A& a) { }
}
|
google | chromium | template2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/template2.C | 255 | utf_8 | 919151216cf8524a1a108c5d27a7f3d1 | // { dg-do compile }
// { dg-options -O2 }
template<class T> struct O {
O(T *p) : q(p) { }
T *q;
};
struct W {
virtual ~W();
};
struct S : public W {
S (int *);
};
W *bar(int);
S::S (int *x)
{
for (int *p = x; *p; p++)
O<W> i (bar (*p));
}
|
google | chromium | loop2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/loop2.C | 156 | utf_8 | 741a6b9a2519e96d9a6a3d7503d9cdfa | // Test that breaking out of a handler works.
// { dg-do run }
int main ()
{
while (1)
{
try { throw 1; }
catch (...) { break; }
}
}
|
google | chromium | loop1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/loop1.C | 484 | utf_8 | 8c375c2c927706fd09f5bb467654b648 | // Verify that loop optimization takes into account the exception edge
// and does not increment I before the call.
// { dg-do run }
// { dg-options "-O2" }
extern "C" void abort();
static void bar(char *);
static void foo(unsigned long element_count, char *ptr)
{
unsigned long i;
try {
for (i = 0; i != eleme... |
google | chromium | ctor2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/ctor2.C | 603 | utf_8 | 1ca64f6d54bb332c6c32d876edf896c0 | // PR c++/4460
// Test that the cleanup for fully-constructed subobjects when a
// constructor throws gets the right address for a virtual base.
// { dg-do run }
int r;
void *p;
struct VBase
{
virtual void f () {}
VBase() { p = this; }
~VBase() { if (p != this) r = 1; }
};
struct StreamBase
{
virtual ~Str... |
google | chromium | spec4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec4.C | 418 | utf_8 | 0d3eff3638fb4e06c734bdd63bc0e2e9 | // PR c++/5104
// Test that a function with a throw spec is a valid template argument.
#include <exception>
typedef void (*HandlerFunction)();
typedef HandlerFunction (*SetHandlerFunction)(HandlerFunction);
template <SetHandlerFunction set_function>
class HandlerStack {
public:
static void defaultHandler();
};
ty... |
google | chromium | spbp | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spbp.C | 518 | utf_8 | bec91ba8094ad48a689833e630aa2025 | /* { dg-do run } */
/* { dg-options "-gdwarf-2" } */
/* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
/* This was a bug on x86-darwin, where the register numbering for SP
and BP was swapped (it's easy to do because on that port it's
different for eh_frame and de... |
google | chromium | arm-iwmmxt-unwind | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/arm-iwmmxt-unwind.C | 1,258 | utf_8 | 991eb7aeea02d80e000538741bcc1603 | /* { dg-do run } */
/* { dg-require-effective-target arm32 } */
#ifdef __IWMMXT__
extern "C" void abort (void);
extern "C" void exit (int);
void
foo (void)
{
register long long wr10 asm("wr10") = 0;
register long long wr11 asm("wr11") = 1;
register long long wr12 asm("wr12") = 2;
register long long wr14 asm("wr... |
google | chromium | ctor3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/ctor3.C | 309 | utf_8 | 3b611e1c78c9e6e4a13c7c40be364f83 | // PR C++/18984
// We just to ICE as we did not add a
// deference to invisible by reference
// variable
// { dg-do compile }
struct Str
{
Str(const char *chars);
Str& operator=(const char *chars);
virtual operator char*() const;
};
Str _localName(Str fullname)
{
return (char*)fullname;
}
|
google | chromium | arm-vfp-unwind | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C | 488 | utf_8 | 7a789c5f5b392854e4bcc712122b232c | /* { dg-do run } */
/* { dg-require-effective-target arm32 } */
/* Test to catch off-by-one errors in arm/pr-support.c. */
#if defined (__VFP_FP__) && !defined (__SOFTFP__)
#include <iostream>
#include <stdlib.h>
using namespace std;
static void donkey ()
{
asm volatile ("fcpyd d9, %P0" : : "w" (1.2345) : "d9")... |
google | chromium | cleanup3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cleanup3.C | 678 | utf_8 | a779539302385f915a13ecb1283ac58c | // C++/4794
// This test used to hang in has_cleanups
/* { dg-do compile } */
void foo (int a,int b,int c,int d,int e,int f,int g,int h,int i,int j,int k,
int l,int m,int n,int o,int p,int q,int r,int s,int t,int u,int v,int w,
int x,int y,int z,int aa,int ab,int ac)
{
if (!((((ac != 0) + (d != 0) + (c != 0) + (f !... |
google | chromium | simd-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/simd-2.C | 907 | utf_8 | 44a4f730fe5698b6f85918f1e49bb9f1 | // Test EH when V4SI SIMD registers are involved.
// { dg-options "-O" }
// { dg-options "-O -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
// { dg-options "-O -w" { target powerpc*-*-* } }
// { dg-options "-O -w -maltivec" { target { powerpc*-*-* && vmx_hw } } }
// { dg-do run }
#include "check-vect.h"
typedef ... |
google | chromium | div | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/div.C | 423 | utf_8 | 576fca342f1265b23facee2429c2f6ce | // { dg-do link }
// { dg-options "-Os" }
/* PR target/28014: main references unsigned divide, and the unwinder
references signed divide.
If libgcc contains an object which defines both, and linking is done with
a space-optimized library that defines these functions in separate objects,
you end up with the ... |
google | chromium | cond1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cond1.C | 1,375 | utf_8 | bd6bd3cc57144658b6137dc9123743ed | // PR c++/7050
// { dg-do run }
extern "C" void abort(void);
#define CI(stmt) try { stmt; abort(); } catch (int) { }
struct has_destructor
{
~has_destructor() { }
};
struct no_destructor
{
};
int PI(int& i) { return i++; }
int main(int argc, char *argv[])
{
(argc+1 ? has_destructor() : throw 0);
CI((a... |
google | chromium | cond2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cond2.C | 258 | utf_8 | 9218246502a1a48c13f74d67b4b19c2d | // PR c++/14083
struct A {
A() throw() { }
A(const A&) throw() { }
};
struct X {
A a;
X();
X& operator=(const X& __str);
};
bool operator==(const X& __lhs, const char* __rhs);
int main() {
X x;
x=="" ? x : throw 1;
}
|
google | chromium | template1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/template1.C | 501 | utf_8 | 289f5219cda86f80dc763b7ad32f8ae8 | // Test whether exception specifier dependent on template parameter
// is accepted during template decl processing.
// { dg-do run }
extern "C" void abort();
class A {};
template <class T>
struct B
{
typedef A E;
};
template <class T>
struct C
{
typedef B<T> D;
typedef typename D::E E;
void f() throw(E) { t... |
google | chromium | catch4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/catch4.C | 118 | utf_8 | f0c303e1f360a147778971d44e9482a4 | // PR c++/28250
// { dg-do compile }
void foo()
{
try { throw; }
catch () {} // { dg-error "type-specifier" }
}
|
google | chromium | elide1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/elide1.C | 481 | utf_8 | b0ccd0dda5f78bbdc113e7d64bcbde3c | // PR c++/13944
// Bug: When eliding the copy from the A temporary into the exception
// object, we extended the throw prohibition to the constructor for the
// temporary. This is wrong; the throw from A() should propagate normally
// regardless of the elision of the temporary.
// { dg-do run }
struct A
{
A() { t... |
google | chromium | forced2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/forced2.C | 1,222 | utf_8 | c57d00c7e2509174eb67af39ca23acc8 | // HP-UX libunwind.so doesn't provide _UA_END_OF_STACK.
// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that leaving the catch block without rethrowing
// does call the exception object destructor.
#include <unwind.h>
#include <stdlib.h>
#include <string.h>
static _Unwind_Reason_Code
force_unwind_stop (int ver... |
google | chromium | dtor1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/dtor1.C | 369 | utf_8 | 1521a64435be961406151b3df9665c39 | // PR c++/411
// Test that a fully-constructed base is destroyed before transferring
// control to the handler of a function-try-block.
// { dg-do run }
int ad;
int r;
struct A {
~A() { ++ad; }
};
struct B: public A {
~B();
};
B::~B ()
try
{
throw 1;
}
catch (...)
{
if (!ad)
r = 1;
ret... |
google | chromium | new1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/new1.C | 516 | utf_8 | 85b9081854ce258c515f0bcfcd1b89c6 | // PR c++/5757
// Test that when a constructor throws in a new-expression, we pass the
// right pointer to operator delete.
// { dg-do run }
#include <new>
int ret = 1;
void *ptr;
void * operator new[] (size_t s) throw (std::bad_alloc)
{
ptr = operator new (s);
return ptr;
}
void operator delete[] (void *p) th... |
google | chromium | simd-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/simd-4.C | 1,144 | utf_8 | d46aab23b9e76d1da7631a4184db1622 | /* { dg-do run { target powerpc*-*-darwin* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O -maltivec" } */
#include <cstdlib>
#include <cstring>
#include <signal.h>
typedef int __attribute__((vector_size(16))) v;
v vv[32];
volatile v vt = { 1, 2, 3, 4 };
void clobber_vrs(void) { };
void (*volatile fp... |
google | chromium | cast1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cast1.C | 97 | utf_8 | 98cf19968cec5fc832747640edb98eee | // PR c++/28523
class A {};
class B : public A {};
int main()
{
throw (A) B();
return 0;
}
|
google | chromium | simd-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/simd-3.C | 987 | utf_8 | 55e1817e6d2f866b9cd25ef5751e2b9c | // { dg-options "-O" }
// { dg-options "-O -maltivec" { target { powerpc*-*-darwin* && powerpc_altivec_ok } } }
// { dg-do run }
#include <cstdlib>
#include <cstring>
typedef int __attribute__((vector_size(16))) v;
v vv[32];
volatile v vt = { 1, 2, 3, 4 };
void clobber_vrs(void) { };
void (*volatile fp)() = clobbe... |
google | chromium | cond3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cond3.C | 245 | utf_8 | a52fa6cd93c130963df8e930451d74a1 | // PR c++/24996
// Bug: the cleanup for the A temporary was confusing the gimplifier
// because of the TRY_CATCH_EXPR for the exception object.
struct A { A(int); ~A(); };
struct B { B(A); ~B(); };
void foo(bool b)
{
throw b ? B(1) : B(1);
}
|
google | chromium | dtor2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/dtor2.C | 334 | utf_8 | 946e2e4e3fafd42b9f9d9e2594d511ac | // PR c++/12751
// tree-ssa eh lowering bug ran a destructor twice for one object
// { dg-do run }
static int check;
struct Y {
Y();
~Y();
};
void foo() {
Y y1;
Y y2;
switch(0) {
case 1: {
Y y3;
return;
}
}
}
Y::Y() { ++check; }
Y::~Y() { --check; }
int main()
{
foo ();
re... |
google | chromium | nested-try | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/nested-try.C | 282 | utf_8 | c8f6f4459095bf15bd799a6d96061277 | // { dg-do compile }
// Nested try statements shadowing each other was crashing in EH edge redirection.
// PR middle-end/40043
struct A
{
~A();
void foo();
};
void bar()
{
A a;
try
{
A b;
try
{
b.foo();
}
catch (int) {}
}
catch (int) {}
}
|
google | chromium | catch3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/catch3.C | 149 | utf_8 | 1d3ce910b0cd941d98917aa650bddcd3 | // PR c++/28250
// { dg-do compile }
template<int> void foo()
{
try {}
catch () {} // { dg-error "type-specifier" }
}
template void foo<0>();
|
google | chromium | catch2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/catch2.C | 119 | utf_8 | a8749c98147fe230e16618ed168a7ffd | // PR c++/28250
// { dg-do compile }
void foo()
{
try {}
catch () {} // { dg-error "before" }
catch (...) {}
}
|
google | chromium | delayslot1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/delayslot1.C | 718 | utf_8 | 6d24a241b37d9461b161f8ce01317ab8 | // PR target/12301
// This used to fail on SPARC because the reorg pass moved an insn
// across a function call that can throw internally, in order to put
// it in a delay slot.
// { dg-do run }
// { dg-options "-O" }
struct S{
char *c;
char data[100];
S () : c (data) {};
S (const S& s) {
c = data;
data... |
google | chromium | ia64-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/ia64-1.C | 1,279 | utf_8 | 83a9a4f114479e6635dd508a4994d73d | // Test whether call saved float and branch regs are restored properly
// We can't do this test for branch regs in ILP32 mode.
// { dg-do run { target ia64-*-* } }
// { dg-options "-O2" }
extern "C" void abort (void);
#ifdef __LP64__
char buf[128];
#endif
void __attribute__((noinline))
bar (void)
{
throw 1;
}
voi... |
google | chromium | pr29166 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/pr29166.C | 13,442 | utf_8 | f31dc353c4075f1cee72592569d86e2e | // PR 29166: r4-r7 corrupted when unwinding.
// { dg-do run }
class Ex
{
public:
int val;
Ex( int v )
: val( v )
{ }
};
void doIt()
{
int OFF( 1000 );
register int v1=OFF+1,v2=OFF+2,v3=OFF+3,v4=OFF+4,v5=OFF+5,v6=OFF+6,v7=OFF+7,v8=OFF+8,v9=OFF+9,v10=OFF+10;
register int v11=OFF+11,v12=OFF+12,v... |
google | chromium | spec6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec6.C | 324 | utf_8 | 1e34c1c6b42ddf40a5347c821bbd04b4 | // Test that we don't allow incomplete types in an exception-specification
// for a definition, or at a call site.
// { dg-options "-fpermissive -w" }
struct A; // { dg-error "" }
struct B
{
void f () throw (A);
};
void B::f () throw (A) {} // { dg-error "A" }
int main ()
{
B b;
b.f(); // { dg-error "A" ... |
google | chromium | crash1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/crash1.C | 98 | utf_8 | 43098e3dd291c59e61245771f6e306d0 | extern "C" void __cxa_throw (void *, void *, void (*) (void *) );
void foo(){
throw 1;
}
|
google | chromium | alias1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/alias1.C | 565 | utf_8 | 562ca7c694e89bb3ac76711c239d5c5e | // { dg-do run }
// { dg-options "-O3" }
/* PR c++/28139: disjoint alias sets for the store from
expand_start_catch_block than for loading P result in P being loaded
before it is initialized for sh-elf. */
extern "C" {
void exit (int) __attribute__ ((noreturn));
}
int i_glob = 42;
int *p0 = &i_glob;
typedef in... |
google | chromium | async-unwind1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/async-unwind1.C | 994 | utf_8 | 88ca3337a1391414cccfd8e3f11d8b42 | // PR rtl-optimization/36419
// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
// { dg-options "-Os -fasynchronous-unwind-tables -mpreferred-stack-boundary=4" }
extern "C" void abort ();
int v = -1;
unsigned int n;
__attribute__((noinline, used))
void foo (int a, int)
{
if (v < 0)
v = ((unsigned... |
google | chromium | init-temp2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/init-temp2.C | 355 | utf_8 | 643f583ec9ab3b01f4f467ba058c591a | // PR c++/34196
// { dg-options "-O -Wuninitialized" }
template <class _Tp> class AutoPtr
{
_Tp* _M_ptr;
public:
explicit AutoPtr(_Tp* __p = 0) : _M_ptr(__p) {}
~AutoPtr() { delete _M_ptr; }
};
struct A
{
A() { }
~A() { throw 1.0; }
};
struct B
{
virtual ~B();
};
B* f (const A &s) { throw 1; }
int
m... |
google | chromium | throw3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/throw3.C | 65 | utf_8 | 45cea983dcee48d4c249758ac270c782 | // PR c++/19312
struct A {};
void foo(A a)
{
throw (A)a;
}
|
google | chromium | simd-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/simd-1.C | 823 | utf_8 | 34ea61b543c5d55d4ed4ce0880521c03 | // Test EH when V2SI SIMD registers are involved.
// { dg-options "-O" }
// { dg-options "-O -w" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
// { dg-do run }
typedef int __attribute__((vector_size (8))) vecint;
vecint vecfunc (vecint beachbum)
{
return beachbum;
}
void f3 (void)
{
/* Force a use of a V2SI reg... |
google | chromium | spec8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/spec8.C | 272 | utf_8 | 84e6bc687977041285d80741d88b5007 | // PR c++/24817
struct exception {};
template <typename T> void foo() throw(exception); // { dg-error "declaration" }
template <typename T> void foo(); // { dg-error "exceptions" }
struct bar
{
template <typename T> friend void foo(); // { dg-error "exceptions" }
};
|
google | chromium | cleanup4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/cleanup4.C | 221 | utf_8 | fdfb8828613e7c687d87d7facb0e2135 | // PR 16254
// { dg-do compile }
// We lost a CLEANUP_POINT_EXPR, leading to a crash destroying temp of A.
struct A
{
~A ();
A (int);
};
int bar (const A &);
void
foo (int i)
{
int format[1] = { bar (A (i)) };
}
|
google | chromium | throw2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/throw2.C | 75 | utf_8 | 7f4aab5cdb2954060fab6ebdbf157a33 | // PR c++/16851
struct A { A(int); };
void f(int t)
{
throw (3,A(t));
}
|
google | chromium | omit-frame-pointer2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/omit-frame-pointer2.C | 369 | utf_8 | dfa0fe611ce9682e5de477f908c0b5c0 | // Reduced from PR c++/5246, PR c++/2447
// { dg-options "-O -fomit-frame-pointer" }
// { dg-do run }
void step (int)
{
void *sp = __builtin_alloca (0);
}
void f2 (void)
{
step (2);
throw int();
}
void f1 (void)
{
try
{
step (1);
f2 ();
step (-1);
}
catch (int)
{
step (3... |
google | chromium | filter1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/filter1.C | 413 | utf_8 | c6ed6afa9f180a60e542789d58e23a4a | // Test that cleanups get run when a catch filter fails to match.
// { dg-do run }
extern "C" void exit(int);
extern "C" void abort();
struct a
{
a();
~a();
};
struct e1 {};
struct e2 {};
void
ex_test ()
{
a aa;
try
{
throw e1 ();
}
catch (e2 &)
{
}
}
int
main ()
{
try
{
... |
google | chromium | simd-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/simd-5.C | 811 | utf_8 | 287024c6dd66b71d3b8b66dc3d93ff8c | // Test EH with V2SI SIMD registers actually restores correct values.
// { dg-options "-O" }
// { dg-do run { target powerpc_spe } }
extern "C" void abort (void);
extern "C" int memcmp (const void *, const void *, __SIZE_TYPE__);
typedef int __attribute__((vector_size (8))) v2si;
v2si a = { 1, 2 };
v2si b = { 3, 4 };
v... |
google | chromium | unwind1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/unwind1.C | 287 | utf_8 | 75e632be1251d6094d2cf9147ed3621d | // PR middle-end/28493
extern "C" void abort ();
struct Command *ptr;
struct Command {
Command() { ptr = this; }
virtual ~Command() { if (ptr != this) abort(); }
};
void tryfunc()
{
Command cmd;
throw 1;
}
int main()
{
try
{
tryfunc();
}
catch (int) { }
}
|
google | chromium | shadow1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/shadow1.C | 596 | utf_8 | aedb51a1352090a92bc38eb90e5d6523 | // We forgot to ignore current context and friends when determing
// which exceptions shadowed eachother.
struct E;
struct B {};
struct D : private B
{
friend class E;
static B *baz (D *);
virtual void V () throw (B); // { dg-error "overriding" "" }
};
struct E : public D
{
virtual void V () throw (D); // {... |
google | chromium | throw1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/throw1.C | 91 | utf_8 | 7549d75346531f9c6ff9ee0763a142b5 | class S
{
public:
S(){}
};
int foo(char* m1) {
throw (m1 ? S() : S());
}
|
google | chromium | catch1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/catch1.C | 122 | utf_8 | 396745d0c48e93d18fd067292d72181d | // PR c++/28250
// { dg-do compile }
template<int> void foo()
{
try {}
catch (int(0)) {} // { dg-error "before" }
}
|
google | chromium | uncaught2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/uncaught2.C | 1,285 | utf_8 | c77f4b5da310cb17818365cde0e153dd | // { dg-do compile }
// { dg-final { scan-assembler-not "__cxa_get_exception" } }
// { dg-options "-fno-use-cxa-get-exception-ptr" }
#include <exception>
#include <cstdlib>
struct Check {
int obj1, obj2;
bool state;
};
static Check const data[] = {
{ 0, 0, false }, // construct [0]
{ 1, 0, true }, // [1] =... |
google | chromium | forced4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/eh/forced4.C | 1,182 | utf_8 | f10d716b3c09f9b7a5dda32ab1762b8a | // HP-UX libunwind.so doesn't provide _UA_END_OF_STACK.
// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that forced unwinding does not call std::unexpected going
// throw a function with a non-empty exception spec.
#include <unwind.h>
#include <stdlib.h>
#include <string.h>
static _Unwind_Reason_Code
force_un... |
google | chromium | g++-bprob-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/bprob/g++-bprob-2.C | 125 | utf_8 | 91292dc36de1287d9de59661dd0c8c78 | namespace {
int calc(int j)
{
if (j==0) return 0;
return calc(j-1)*j % 17;
}
}
int main(void)
{
return calc(25);
}
|
google | chromium | g++-bprob-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C | 4,998 | utf_8 | 232269dc2a9b913c19e49f1e7a29bf08 | /* Check that various C constructs (in C++) don't cause problems for
* profile-directed block ordering.
Most of this test is the same as bprob-1.c and gcov-4.c in
gcc.misc-tests. The "count" comments are left in to make comparisons
easier; they are ignored for this test. */
extern "C" void abort (void);
/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.