OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-src/gcc-4.2.2/gcc/testsuite/g++.dg/compat/eh
    from Rev 149 to Rev 154
    Reverse comparison

Rev 149 → Rev 154

/filter2_x.C
0,0 → 1,20
#include <exception>
#include <cstdlib>
 
extern void my_terminate (void);
extern void ex_test (void);
 
void
filter2_x ()
{
std::set_terminate (my_terminate);
 
try
{
ex_test ();
}
catch (...)
{
}
abort ();
}
filter2_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: filter1_y.C =================================================================== --- filter1_y.C (nonexistent) +++ filter1_y.C (revision 154) @@ -0,0 +1,17 @@ +#include "filter1.h" + +struct e1 {}; +struct e2 {}; + +void +ex_test () +{ + a aa; + try + { + throw e1 (); + } + catch (e2 &) + { + } +}
filter1_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor2.h =================================================================== --- ctor2.h (nonexistent) +++ ctor2.h (revision 154) @@ -0,0 +1,22 @@ +struct VBase +{ + virtual void f () {} + VBase(); + ~VBase(); +}; + +struct StreamBase +{ + virtual ~StreamBase() {} +}; + +struct Stream : public virtual VBase, public StreamBase +{ + Stream(); + virtual ~Stream() {} +}; + +struct DerivedStream : public Stream +{ + DerivedStream(); +};
ctor2.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: dtor1.h =================================================================== --- dtor1.h (nonexistent) +++ dtor1.h (revision 154) @@ -0,0 +1,7 @@ +struct A { + ~A(); +}; + +struct B: public A { + ~B(); +};
dtor1.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: filter2_y.C =================================================================== --- filter2_y.C (nonexistent) +++ filter2_y.C (revision 154) @@ -0,0 +1,39 @@ +#include +#include + +struct e1 {}; +struct e2 {}; + +struct a +{ + a () { } + + ~a () + { + try + { + throw e1(); + } + catch (e2 &) + { + } + } +}; + +void +ex_test () +{ + a aa; + try + { + throw e1 (); + } + catch (e2 &) + { + } +} + +void my_terminate () +{ + std::exit (0); +}
filter2_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: template1_main.C =================================================================== --- template1_main.C (nonexistent) +++ template1_main.C (revision 154) @@ -0,0 +1,12 @@ +// Test whether exception specifier dependent on template parameter +// is accepted during template decl processing. + +// Split into pieces for binary compatibility testing October 2002 + +extern void template1_x (void); + +int +main () +{ + template1_x (); +}
template1_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: new1_x.C =================================================================== --- new1_x.C (nonexistent) +++ new1_x.C (revision 154) @@ -0,0 +1,28 @@ +#include + +extern "C" void exit (int); +extern "C" void abort (void); + +extern void * operator new[] (size_t s) throw (std::bad_alloc); +extern void operator delete[] (void *p) throw (); + +struct A +{ + A() { throw 1; } + ~A() {} +}; + +int ret = 1; + +void +new1_x () +{ + try + { + A *p = new A[4]; + } + catch (...) {} + if (ret != 0) + abort (); + exit (0); +}
new1_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: template1.h =================================================================== --- template1.h (nonexistent) +++ template1.h (revision 154) @@ -0,0 +1,15 @@ +class A {}; + +template +struct B +{ + typedef A E; +}; + +template +struct C +{ + typedef B D; + typedef typename D::E E; + void f() throw(E); +};
template1.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: new1_y.C =================================================================== --- new1_y.C (nonexistent) +++ new1_y.C (revision 154) @@ -0,0 +1,18 @@ +#include + +extern int ret; + +void *ptr; +void * operator new[] (size_t s) throw (std::bad_alloc) +{ + ptr = operator new (s); + return ptr; +} + +void operator delete[] (void *p) throw () +{ + if (p == ptr) + ret = 0; + operator delete (p); +} +
new1_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: filter2_main.C =================================================================== --- filter2_main.C (nonexistent) +++ filter2_main.C (revision 154) @@ -0,0 +1,12 @@ +// Test that terminate gets run when a catch filter fails to match while +// running destructors. Original bug depended on a::~a being inlined. + +// Split into pieces for binary compatibility testing October 2002 + +extern void filter2_x (void); + +int +main () +{ + filter2_x (); +}
filter2_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor1_x.C =================================================================== --- ctor1_x.C (nonexistent) +++ ctor1_x.C (revision 154) @@ -0,0 +1,22 @@ +extern "C" void abort (void); +extern "C" void exit (int); + +#include "ctor1.h" + +bool was_f_in_Bar_destroyed=false; + +void ctor1_x () +{ + try + { + Bar f; + } + catch(int i) + { + if(was_f_in_Bar_destroyed) + { + exit (0); + } + } + abort (); +}
ctor1_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: dtor1_x.C =================================================================== --- dtor1_x.C (nonexistent) +++ dtor1_x.C (revision 154) @@ -0,0 +1,14 @@ +extern "C" void exit (int); +extern "C" void abort (void); + +#include "dtor1.h" + +int r; + +void dtor1_x () +{ + { B b; } + if (r != 0) + abort (); + exit (0); +}
dtor1_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor2_x.C =================================================================== --- ctor2_x.C (nonexistent) +++ ctor2_x.C (revision 154) @@ -0,0 +1,19 @@ +extern "C" void exit (int); +extern "C" void abort (void); + +#include "ctor2.h" + +int r; + +void ctor2_x () { + + try + { + DerivedStream str; + } + catch (...) { } + + if (r != 0) + abort (); + exit (0); +}
ctor2_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor1_y.C =================================================================== --- ctor1_y.C (nonexistent) +++ ctor1_y.C (revision 154) @@ -0,0 +1,13 @@ +extern bool was_f_in_Bar_destroyed; + +#include "ctor1.h" + +Foo::~Foo() +{ + was_f_in_Bar_destroyed=true; +} + +Bar::~Bar() +{ + throw 1; +}
ctor1_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: dtor1_y.C =================================================================== --- dtor1_y.C (nonexistent) +++ dtor1_y.C (revision 154) @@ -0,0 +1,18 @@ +extern int r; +int ad; + +#include "dtor1.h" + +A::~A () { ++ad; } + +B::~B () +try + { + throw 1; + } +catch (...) + { + if (!ad) + r = 1; + return; + }
dtor1_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor2_y.C =================================================================== --- ctor2_y.C (nonexistent) +++ ctor2_y.C (revision 154) @@ -0,0 +1,20 @@ +extern int r; +void *p; + +#include "ctor2.h" + +VBase::VBase () +{ + p = this; +} + +VBase::~VBase () +{ + if (p != this) r = 1; +} + +Stream::Stream () {} +DerivedStream::DerivedStream () +{ + throw 1; +}
ctor2_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: spec3.h =================================================================== --- spec3.h (nonexistent) +++ spec3.h (revision 154) @@ -0,0 +1,8 @@ +class Base {}; + +struct A : virtual public Base +{ + A(); +}; + +struct B {};
spec3.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: template1_x.C =================================================================== --- template1_x.C (nonexistent) +++ template1_x.C (revision 154) @@ -0,0 +1,21 @@ +extern "C" void exit (int); +extern "C" void abort (void); + +#include "template1.h" + +void template1_x () +{ + int caught = 0; + try + { + C x; + x.f(); + } + catch (A) + { + ++caught; + } + if (caught != 1) + abort (); + exit (0); +}
template1_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: template1_y.C =================================================================== --- template1_y.C (nonexistent) +++ template1_y.C (revision 154) @@ -0,0 +1,8 @@ +#include "template1.h" + +template void C::f (void) throw (E) +{ + throw E(); +} + +template class C;
template1_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: nrv1_main.C =================================================================== --- nrv1_main.C (nonexistent) +++ nrv1_main.C (revision 154) @@ -0,0 +1,12 @@ +// PR c++/5636 +// Bug: the named return value optimization interfered with EH cleanups. + +// Split into pieces for binary compatibility testing October 2002 + +extern void nrv1_x (void); + +int +main () +{ + nrv1_x (); +}
nrv1_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: nrv1.h =================================================================== --- nrv1.h (nonexistent) +++ nrv1.h (revision 154) @@ -0,0 +1,5 @@ +struct A +{ + A(); + ~A(); +};
nrv1.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: dtor1_main.C =================================================================== --- dtor1_main.C (nonexistent) +++ dtor1_main.C (revision 154) @@ -0,0 +1,14 @@ +// PR c++/411 + +// Test that a fully-constructed base is destroyed before transferring +// control to the handler of a function-try-block. + +// Split into pieces for binary compatibility testing October 2002 + +extern void dtor1_x (void); + +int +main () +{ + dtor1_x (); +}
dtor1_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor2_main.C =================================================================== --- ctor2_main.C (nonexistent) +++ ctor2_main.C (revision 154) @@ -0,0 +1,12 @@ +// PR c++/4460 +// Test that the cleanup for fully-constructed subobjects when a +// constructor throws gets the right address for a virtual base. + +// Split into pieces for binary compatibility testing October 2002 + +extern void ctor2_x (void); + +int main () +{ + ctor2_x (); +}
ctor2_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: spec3_x.C =================================================================== --- spec3_x.C (nonexistent) +++ spec3_x.C (revision 154) @@ -0,0 +1,9 @@ +#include "spec3.h" + +extern void func () throw (B,A); + +void spec3_x (void) +{ + try { func(); } + catch (A& a) { } +}
spec3_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: spec3_y.C =================================================================== --- spec3_y.C (nonexistent) +++ spec3_y.C (revision 154) @@ -0,0 +1,8 @@ +#include "spec3.h" + +A::A() {} + +void func() throw (B,A) +{ + throw A(); +}
spec3_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: filter1_main.C =================================================================== --- filter1_main.C (nonexistent) +++ filter1_main.C (revision 154) @@ -0,0 +1,11 @@ +// Test that cleanups get run when a catch filter fails to match. + +// Split into pieces for binary compatibility testing October 2002 + +extern void filter1_x (void); + +int +main () +{ + filter1_x (); +}
filter1_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: filter1.h =================================================================== --- filter1.h (nonexistent) +++ filter1.h (revision 154) @@ -0,0 +1,5 @@ +struct a +{ + a(); + ~a(); +};
filter1.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: unexpected1_x.C =================================================================== --- unexpected1_x.C (nonexistent) +++ unexpected1_x.C (revision 154) @@ -0,0 +1,26 @@ +#include + +struct One { }; +struct Two { }; + +extern "C" void abort (); +extern void doit (void) throw (Two); +extern void handle_unexpected (void); + +void +unexpected1_x () +{ + std::set_unexpected (handle_unexpected); + + try + { + doit (); + } + catch (Two &) + { + } + catch (...) + { + abort (); + } +}
unexpected1_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: unexpected1_y.C =================================================================== --- unexpected1_y.C (nonexistent) +++ unexpected1_y.C (revision 154) @@ -0,0 +1,21 @@ +struct One { }; +struct Two { }; + +void +handle_unexpected () +{ + try + { + throw; + } + catch (One &) + { + throw Two (); + } +} + +void +doit () throw (Two) +{ + throw One (); +}
unexpected1_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: nrv1_x.C =================================================================== --- nrv1_x.C (nonexistent) +++ nrv1_x.C (revision 154) @@ -0,0 +1,21 @@ +extern "C" void exit (int); +extern "C" void abort (void); + +#include "nrv1.h" + +extern A f (void); + +int c, d; + +void nrv1_x () +{ + try + { A a = f(); } + catch (...) { } + if (d < c) + abort (); + exit (0); +} + +A::A() { ++c; } +A::~A() { ++d; }
nrv1_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: new1_main.C =================================================================== --- new1_main.C (nonexistent) +++ new1_main.C (revision 154) @@ -0,0 +1,13 @@ +// PR c++/5757 +// Test that when a constructor throws in a new-expression, we pass the +// right pointer to operator delete. + +// Split into pieces for binary compatibility testing October 2002 + +extern void new1_x (void); + +int +main () +{ + new1_x (); +}
new1_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: nrv1_y.C =================================================================== --- nrv1_y.C (nonexistent) +++ nrv1_y.C (revision 154) @@ -0,0 +1,8 @@ +#include "nrv1.h" + +A f() +{ + A nrv; + throw 42; + return nrv; +}
nrv1_y.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: spec3_main.C =================================================================== --- spec3_main.C (nonexistent) +++ spec3_main.C (revision 154) @@ -0,0 +1,12 @@ +// PR c++/4381 +// Test that exception-specs work properly for classes with virtual bases. + +// Split into pieces for binary compatibility testing October 2002 + +extern void spec3_x (void); + +int +main () +{ + spec3_x (); +}
spec3_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: unexpected1_main.C =================================================================== --- unexpected1_main.C (nonexistent) +++ unexpected1_main.C (revision 154) @@ -0,0 +1,12 @@ +// PR 3719 +// Test that an unexpected handler can rethrow to categorize. + +// Split into pieces for binary compatibility testing October 2002 + +extern void unexpected1_x (); + +int +main () +{ + unexpected1_x (); +}
unexpected1_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor1_main.C =================================================================== --- ctor1_main.C (nonexistent) +++ ctor1_main.C (revision 154) @@ -0,0 +1,13 @@ +// Copyright (C) 2001 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 26 Dec 2001 +// PR 411 + +// Split into pieces for binary compatibility testing October 2002 + +extern void ctor1_x (void); + +int +main () +{ + ctor1_x (); +}
ctor1_main.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: filter1_x.C =================================================================== --- filter1_x.C (nonexistent) +++ filter1_x.C (revision 154) @@ -0,0 +1,21 @@ +#include "filter1.h" + +extern "C" void exit (int); +extern "C" void abort (void); +extern void ex_test (void); + +void +filter1_x () +{ + try + { + ex_test (); + } + catch (...) + { + } + abort (); +} + +a::a() { } +a::~a() { exit (0); }
filter1_x.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ctor1.h =================================================================== --- ctor1.h (nonexistent) +++ ctor1.h (revision 154) @@ -0,0 +1,10 @@ +struct Foo +{ + ~Foo (); +}; + +struct Bar +{ + ~Bar (); + Foo f; +};
ctor1.h Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.