URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// Test whether exception specifier dependent on template parameter
|
// Test whether exception specifier dependent on template parameter
|
// is accepted during template decl processing.
|
// is accepted during template decl processing.
|
// { dg-do run }
|
// { dg-do run }
|
|
|
extern "C" void abort();
|
extern "C" void abort();
|
|
|
class A {};
|
class A {};
|
|
|
template
|
template
|
struct B
|
struct B
|
{
|
{
|
typedef A E;
|
typedef A E;
|
};
|
};
|
|
|
template
|
template
|
struct C
|
struct C
|
{
|
{
|
typedef B D;
|
typedef B D;
|
typedef typename D::E E;
|
typedef typename D::E E;
|
void f() throw(E) { throw E(); }
|
void f() throw(E) { throw E(); }
|
};
|
};
|
|
|
int main()
|
int main()
|
{
|
{
|
int caught = 0;
|
int caught = 0;
|
try
|
try
|
{
|
{
|
C x;
|
C x;
|
x.f();
|
x.f();
|
}
|
}
|
catch (A)
|
catch (A)
|
{
|
{
|
++caught;
|
++caught;
|
}
|
}
|
if (caught != 1)
|
if (caught != 1)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.