URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.eh/] [catch10.C] - Rev 384
Compare with Previous | Blame | View Log
// { dg-do assemble }
// Test that we notice unfortunate handler ordering.
struct A { };
struct B: public A { };
struct C: private A { };
void f();
void g()
{
try { f(); }
catch (...) { } // { dg-error "" } ... followed by others
catch (A*) { }
try { f(); }
catch (A*) { } // { dg-warning "" } A* before B*
catch (B*) { } // { dg-warning "" } A* before B*
try { f(); }
catch (A*) { }
catch (C*) { } // no warning; A is private base
}