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
gcov-6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/gcov/gcov-6.C
309
utf_8
0db2a2956de58970834889c74f43082d
// PR gcov-profile/34609 // { dg-do compile } // { dg-options "-O -ftest-coverage" } struct A { int i; int &get () { return i; } }; inline A foo () { A a; a.get (); return a; } inline A bar () { return foo (); } void baz () { A a; a = bar (); } // { dg-final { cleanup-coverage-files } }
google
android
gcov-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/gcov/gcov-2.C
465
utf_8
afab866e59f46409fb68aa64174f3acf
/* Verify line coverage counts for simple member functions. */ /* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ class C { public: C() { i = 0; /* count(1) */ } ~C() {} void seti (int j) { i = j; /* count(1) */ } private: int i; }; void foo() { ...
google
android
gcov-11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/gcov/gcov-11.C
653
utf_8
22fc6504c62d44c9b94fe8d23a3e383f
/* Check that unexecuted exception processing regions are shown distinct from unexecuted normal regions. */ /* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ void Baz (int i) { if (i) throw 1; } void Boz () throw () { } int main () { try { Baz (0); /...
google
android
gcov-10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/gcov/gcov-10.C
414
utf_8
3bb74e0b30131d9ca29c007bfd471494
/* Ensure PIC sequence used for comdat functions */ /* { dg-options "-fprofile-arcs -ftest-coverage -fpic" } */ /* { dg-do run { target native } } */ /* { dg-require-effective-target fpic } */ inline int __attribute__ ((noinline)) Foo () { static int x[1]; return x[0]++; /* count (1) */ } int main () { Foo (...
google
android
gcov-5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/gcov/gcov-5.C
928
utf_8
8ade32db1de614a89b3775d4d1d03415
/* Check that execution counts for template functions are reported correctly by gcov. */ #include <stdio.h> #include <stdlib.h> /* { dg-options "-fprofile-arcs -ftest-coverage -fno-inline" } */ /* { dg-do run { target native } } */ class A { int count; public: A(int c) { count = c; } void func(void) { prin...
google
android
gcovpart-12b
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/gcov/gcovpart-12b.C
120
utf_8
28167c93ffea74cb328ff3cd087d643a
struct Foo { Foo () {} virtual void Func () /* count(-) { xfail *-*-* } */ {} /* count(-) { xfail *-*-* } */ };
google
android
gcov-4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/gcov/gcov-4.C
785
utf_8
a7c093e32d8e0cc08e02c3253748979c
/* Check that execution counts and branch probabilities for various C constructs are reported correctly by gcov. */ #include <stdio.h> /* { dg-options "-fprofile-arcs -ftest-coverage -fno-exceptions" } */ /* { dg-do run { target native } } */ class foo { public: foo() { printf("foo()\n"); }; ~foo() { printf("...
google
android
async-unwind1
.C
toolchain/gcc/gcc-4.9/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
android
catch3
.C
toolchain/gcc/gcc-4.9/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
android
cast1
.C
toolchain/gcc/gcc-4.9/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
android
catch1
.C
toolchain/gcc/gcc-4.9/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
android
fp-regs
.C
toolchain/gcc/gcc-4.9/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
android
builtin2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/builtin2.C
595
utf_8
4ea1fd09af5612cf63c0b8b5ee3ba60d
// 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(); extern void callme (void) throw(); int foo (int i) { try {...
google
android
crash1
.C
toolchain/gcc/gcc-4.9/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
android
shadow1
.C
toolchain/gcc/gcc-4.9/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
android
omit-frame-pointer2
.C
toolchain/gcc/gcc-4.9/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
android
array1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/array1.C
308
utf_8
b86f76327997b943fad52cb93e574fdd
// Test that we have one EH cleanup region for the whole array // rather than one for each element. // { dg-options "-fdump-tree-gimple" } struct A { A(); ~A(); }; void f() { A a[10] = { }; } // { dg-final { scan-tree-dump-times "catch" 1 "gimple" } } // { dg-final { cleanup-tree-dump "gimple" } }
google
android
elide2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/elide2.C
326
utf_8
4a5da75795bd16f83ee0a55370fa4396
// PR c++/13944 // Verify that we don't call terminate() if initializing the exception // object throws. // { dg-do run } struct A { A() { } A(const A&) { throw 1; } }; A a; int main() { try { throw a; } catch (int) { return 0; } catch (A&) { return 2; } return...
google
android
synth1
.C
toolchain/gcc/gcc-4.9/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
android
cond4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/cond4.C
459
utf_8
854c4ed2d9c684ae82e07abbd6f2c60c
// Runtime version of cond3.C. We call terminate when the A cleanup throws // because we've already initialized the exception object. // { dg-do run } #include <exception> #include <cstdlib> void my_terminate () { std::exit (0); } struct A { A(int) { } ~A() { throw 1; }; }; struct B { B(A) { } ~B() { } };...
google
android
simd-3
.C
toolchain/gcc/gcc-4.9/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
android
080514-1
.C
toolchain/gcc/gcc-4.9/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
android
spbp
.C
toolchain/gcc/gcc-4.9/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
android
pr41819
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/pr41819.C
222
utf_8
6a9998276cbf3cf9c6d6f6f64f96a145
// { dg-do compile } // { dg-options "-fno-exceptions" } struct S { ~S(); }; extern void bar(); void f0() { S s; bar(); } void f1() { try {} catch (...) {} // { dg-error "" } } void f2() throw(int) { bar(); }
google
android
registers1
.C
toolchain/gcc/gcc-4.9/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
android
forced4
.C
toolchain/gcc/gcc-4.9/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
android
delayslot1
.C
toolchain/gcc/gcc-4.9/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
android
catch5
.C
toolchain/gcc/gcc-4.9/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
android
ctor3
.C
toolchain/gcc/gcc-4.9/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
android
goto1
.C
toolchain/gcc/gcc-4.9/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
android
unwind-direct
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/unwind-direct.C
261
utf_8
0dd221086ed06eda43a00693a7ba5e7a
// PR target/59788 // { dg-do run { target { *-*-solaris2* && { ! gld } } } } // { dg-options "-Wl,-Bdirect" } #include <stdexcept> int main(void) { try { throw std::runtime_error( "Catch me if you can!"); } catch(...) { return 0; } return 1; }
google
android
pr43365
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/pr43365.C
300
utf_8
6b7a6fb9b5bb6227cd79629a94634556
extern "C" void abort(); class Counter { public: static int count; ~Counter() { count += 1; } }; int Counter::count = 0; void func() { Counter c; try { throw 1; } catch (const int&) { return; } } int main() { func(); if (Counter::count != 1) abort(); return 0; }
google
android
template2
.C
toolchain/gcc/gcc-4.9/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
android
anon2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/anon2.C
425
utf_8
d6a2edbc35caa25cec47fb759e313e04
// Test that the anonymous namespace isn't mangled with random characters, // but also doesn't get mixed up with an anonymous namespace in another // translation unit. // { dg-final { scan-assembler "\\*N12_GLOBAL__N_11AE" } } namespace { struct A { virtual void f(); }; void A::f() { } } extern void g();...
google
android
spec6
.C
toolchain/gcc/gcc-4.9/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
android
spec7
.C
toolchain/gcc/gcc-4.9/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
android
ppc64-sighandle-cr
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/ppc64-sighandle-cr.C
1,071
utf_8
bafc15005abdfe9131f6074efde175eb
// { dg-do run { target { powerpc64*-*-linux* } } } // { dg-options "-fexceptions -fnon-call-exceptions" } #include <signal.h> #include <stdlib.h> #include <fenv.h> #define SET_CR(R,V) __asm__ __volatile__ ("mtcrf %0,%1" : : "n" (1<<(7-R)), "r" (V<<(4*(7-R))) : "cr" #R) #define GET_CR(R) ({ int tmp; __asm__ __volatil...
google
android
cond2
.C
toolchain/gcc/gcc-4.9/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
android
template1
.C
toolchain/gcc/gcc-4.9/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
android
scope1
.C
toolchain/gcc/gcc-4.9/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
android
arm-vfp-unwind
.C
toolchain/gcc/gcc-4.9/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
android
cleanup1
.C
toolchain/gcc/gcc-4.9/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
android
uncaught2
.C
toolchain/gcc/gcc-4.9/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
android
unwind2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/unwind2.C
2,677
utf_8
a758dbc649ac4070d4dbe5fa7130d1e5
// PR debug/43290 // { dg-do compile } // { dg-options "-O2" } // { dg-options "-O3 -mavx -fPIC -mtune=core2" { target { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } } } namespace std { template <class> struct char_traits; } typedef struct { union { char __wchb[4]; }; } mbstate_t; namespace std { template <typen...
google
android
pr38662
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/pr38662.C
246
utf_8
7f6fb1de797a759786743fea91fe804f
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } class E { }; class T { int foo(bool a) throw (E) __attribute__((regparm(1))); int bar(bool b) __attribute__((regparm(1))); }; int T::bar(bool b) { return (b ? 1 : 2); }
google
android
defarg1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/defarg1.C
143
utf_8
87d9e27b3716eabb3dabd6b8b1a837e7
// PR c++/50424 // { dg-do run } int f() { throw 1; } void g( int = f() ) { } void h() { g(); } int main() { try { h(); } catch (int) { } }
google
android
ia64-1
.C
toolchain/gcc/gcc-4.9/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
android
anon1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/anon1.C
425
utf_8
8d65b4e77af51b19427e0978978ad81f
// Test that the anonymous namespace isn't mangled with random characters, // but also doesn't get mixed up with an anonymous namespace in another // translation unit. // { dg-do run } // { dg-additional-sources "anon1a.cc" } namespace { struct A { virtual void f(); }; void A::f() { } } extern void g();...
google
android
catch2
.C
toolchain/gcc/gcc-4.9/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
android
cleanup5
.C
toolchain/gcc/gcc-4.9/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
android
cond3
.C
toolchain/gcc/gcc-4.9/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
android
goto2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/goto2.C
300
utf_8
e879ad8a3a286a76c986e863db470556
// PR c++/32080 void f() try { goto l2; // { dg-error "from here" } l1: ; // { dg-error "jump to label 'l1'" } } catch (...) { l2: ; // { dg-error "jump to label 'l2'|enters catch block" } goto l1; // { dg-error "from here|enters try block" } }
google
android
builtin4
.C
toolchain/gcc/gcc-4.9/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
android
weak1
.C
toolchain/gcc/gcc-4.9/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
android
elide1
.C
toolchain/gcc/gcc-4.9/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
android
filter1
.C
toolchain/gcc/gcc-4.9/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
android
simd-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/simd-2.C
1,017
utf_8
8ca9b346be7f84c368ac74fd74ad5bbf
// Test EH when V4SI SIMD registers are involved. // { dg-options "-O -Wno-abi" } // { dg-options "-O -w -msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } // { dg-options "-O -w" { target powerpc*-*-* } } // { dg-options "-O -w -maltivec" { target { powerpc*-*-* && vmx_hw } } } // { dg-do run } // { dg-require-e...
google
android
spec3
.C
toolchain/gcc/gcc-4.9/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
android
cond6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/cond6.C
534
utf_8
e2de0bdd91c75a83e86d8e423986c99d
// PR c++/49165 // { dg-do run } extern "C" void abort (); int foo (bool x, int y) { if (y < 10 && (x ? 1 : throw 1)) y++; if (y > 20 || (x ? 1 : throw 2)) y++; return y; } int main () { if (foo (true, 0) != 2 || foo (true, 10) != 11 || foo (false, 30) != 31) abort (); try { ...
google
android
builtin1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/builtin1.C
613
utf_8
f399c77ad83fefab7b1a2b3d1d8b5147
// 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 *, ...); extern void callme (void) throw(); int foo...
google
android
simd-5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/simd-5.C
837
utf_8
7bbbffa771c48a85ca22cc69554f7cc4
// Test EH with V2SI SIMD registers actually restores correct values. // { dg-options "-O" } // { dg-do run { target { powerpc_spe && { ! *-*-vxworks* } } } } 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,...
google
android
uncaught1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/uncaught1.C
1,270
utf_8
c7d37e91415ca637d75ff50b8ef9cfe1
// 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, false }, // [1] = [0] { 0, 0, ...
google
android
crossjump1
.C
toolchain/gcc/gcc-4.9/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
android
simd-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/simd-1.C
832
utf_8
83a7ff2264ae46e51ffcca7ca6a7cf8c
// Test EH when V2SI SIMD registers are involved. // { dg-options "-O -Wno-abi" } // { 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...
google
android
ia64-2
.C
toolchain/gcc/gcc-4.9/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
android
cleanup4
.C
toolchain/gcc/gcc-4.9/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
android
table
.C
toolchain/gcc/gcc-4.9/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
android
pr45569
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/pr45569.C
254
utf_8
37a2850c4da2ab3228838db96491ed2b
// { dg-do compile } // { dg-options "-O -fnon-call-exceptions" } float f (); _Complex float g (); void i (_Complex float); float j () { _Complex float x = 0; try { x = f (); } catch ( ...) { x += g (); } i (x); }
google
android
init-temp2
.C
toolchain/gcc/gcc-4.9/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
android
forced2
.C
toolchain/gcc/gcc-4.9/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
android
arm-iwmmxt-unwind
.C
toolchain/gcc/gcc-4.9/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
android
builtin3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/builtin3.C
428
utf_8
f94081e0c65976fce9df251273edf838
// 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" } extern void callme (void) throw(); int bar (int i) { try { __builtin_printf ("foo %d\n", i); } catch (...) { callme(); }...
google
android
spec5
.C
toolchain/gcc/gcc-4.9/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
android
div
.C
toolchain/gcc/gcc-4.9/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
android
sighandle
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/sighandle.C
602
utf_8
903ed37f1eb9c9dc4416168976ee3c8b
// { dg-do run { target { *-*-aix5* i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } } // { dg-options "-fexceptions -fnon-call-exceptions" } #include <signal.h> #include <stdlib.h> void sighandler (int signo, siginfo_t * si, void * uc) { throw (5); } char * dosegv () { * ((volatile int *)0) = 12; } int main (...
google
android
spec9
.C
toolchain/gcc/gcc-4.9/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
android
subreg-1
.C
toolchain/gcc/gcc-4.9/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
android
omit-frame-pointer
.C
toolchain/gcc/gcc-4.9/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
android
dtor3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/dtor3.C
270
utf_8
023501b088469a8d2387c36a54034beb
// Red Hat bug 750545 // { dg-do run { target { ! c++11 } } } class excep {}; class A { public: ~A() { throw excep(); } }; class B { A a; }; class C { B b; }; void f() { C* c = new C(); try { delete c; } catch(...) {} } int main() { f(); }
google
android
spec4
.C
toolchain/gcc/gcc-4.9/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
android
new1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/new1.C
557
utf_8
23952b7ea476d5b48676096bba2e67c1
// 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[] (std::size_t s) #if __cplusplus <= 199711L throw (std::bad_alloc) #endif { ptr = operator new (s); return pt...
google
android
ctor2
.C
toolchain/gcc/gcc-4.9/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
android
unwind1
.C
toolchain/gcc/gcc-4.9/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
android
synth2
.C
toolchain/gcc/gcc-4.9/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
android
spec10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/spec10.C
600
utf_8
3d659e64086eab4c277f68cb3479ada7
// Make sure that we call terminate when a throw() spec is violated even // with -fnothrow-opt. The function pointers are there to make sure that // the compiler doesn't get clever about optimizing the calls based on // knowledge about the called functions. // { dg-options "-fnothrow-opt" } // { dg-do run } #include...
google
android
dead1
.C
toolchain/gcc/gcc-4.9/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
android
cond5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/cond5.C
540
utf_8
8d0d0d1daa7ce211b24bfa05d2bcc16c
// PR c++/49165 // { dg-do run } extern "C" void abort (); int foo (bool x, int y) { if (y < 10 && (x ? true : throw 1)) y++; if (y > 20 || (x ? true : throw 2)) y++; return y; } int main () { if (foo (true, 0) != 2 || foo (true, 10) != 11 || foo (false, 30) != 31) abort (); try ...
google
android
throw1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/throw1.C
91
utf_8
7549d75346531f9c6ff9ee0763a142b5
class S { public: S(){} }; int foo(char* m1) { throw (m1 ? S() : S()); }
google
android
cleanup3
.C
toolchain/gcc/gcc-4.9/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
android
catch4
.C
toolchain/gcc/gcc-4.9/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
android
loop1
.C
toolchain/gcc/gcc-4.9/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
android
loop2
.C
toolchain/gcc/gcc-4.9/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
android
spec8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/spec8.C
270
utf_8
4aad60db9d28e539197588b52e123296
// PR c++/24817 struct exception {}; template <typename T> void foo() throw(exception); // { dg-error "declaration" } template <typename T> void foo(); // { dg-error "exception" } struct bar { template <typename T> friend void foo(); // { dg-error "exception" } };
google
android
spec2
.C
toolchain/gcc/gcc-4.9/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
android
terminate1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/terminate1.C
680
utf_8
fd9d6b2aeb10f429dd19c2675cd7ac03
// PR c++/44127 // This is basically the same test as g++.eh/terminate1.C, but that one // tests runtime behavior and this tests the assembly output. The test // should call terminate (because initializing the catch parm throws), but // from the personality routine, not directly. // { dg-final { scan-assembler-not "...
google
android
init-temp1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/init-temp1.C
832
utf_8
c0abaf19bc6ccea1ddcd7d45a062e6f7
// PR c++/15764 // { dg-do run } #ifdef __GXX_EXPERIMENTAL_CXX0X__ #define NOEXCEPT_FALSE noexcept (false) #else #define NOEXCEPT_FALSE #endif extern "C" void abort (); int thrown; int as; struct a { a () { ++as; } ~a () NOEXCEPT_FALSE { --as; if (thrown++ == 0) throw 42; } }; int f (a const&) { return 1;...
google
android
stabilize
.C
toolchain/gcc/gcc-4.9/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
android
ctor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/eh/ctor1.C
587
utf_8
0aa754d9c4446d12efdfc8a0736605bb
// { dg-do run } // PR 411 #ifdef __GXX_EXPERIMENTAL_CXX0X__ #define NOEXCEPT_FALSE noexcept (false) #else #define NOEXCEPT_FALSE #endif bool was_f_in_Bar_destroyed=false; struct Foo { ~Foo() { was_f_in_Bar_destroyed=true; } }; struct Bar { ~Bar() NOEXCEPT_FALSE { throw 1; } Foo f; }; int main(...
google
android
nrv1
.C
toolchain/gcc/gcc-4.9/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
android
dtor2
.C
toolchain/gcc/gcc-4.9/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...