d1877a9b13
* g++.old-deja/g++.other/crash24.C: New test. * g++.old-deja/g++.other/crash25.C: New test. * g++.old-deja/g++.other/crash26.C: New test. * g++.old-deja/g++.other/crash27.C: New test. * g++.old-deja/g++.other/crash28.C: New test. * g++.old-deja/g++.other/crash29.C: New test. * g++.old-deja/g++.other/crash30.C: New test. * g++.old-deja/g++.other/crash31.C: New test. * g++.old-deja/g++.other/crash32.C: New test. * g++.old-deja/g++.other/crash33.C: New test. * g++.old-deja/g++.other/crash34.C: New test. * g++.old-deja/g++.other/crash35.C: New test. From-SVN: r37275
38 lines
549 B
C
38 lines
549 B
C
// Build don't link:
|
|
// Origin: Jakub Jelinek <jakub@redhat.com>
|
|
|
|
// crash test - XFAIL *-*-*
|
|
|
|
namespace N
|
|
{
|
|
class X;
|
|
template <class T>
|
|
class Y
|
|
{
|
|
public:
|
|
inline Y () {}
|
|
inline operator const Y<X> & () const
|
|
{
|
|
return *reinterpret_cast<const Y<X> *>(this);
|
|
}
|
|
};
|
|
}
|
|
class bar
|
|
{
|
|
public:
|
|
inline bar () {}
|
|
inline bar (const ::N::Y< ::N::X>& a);
|
|
};
|
|
|
|
class foo
|
|
{
|
|
bool b;
|
|
public:
|
|
foo();
|
|
void x () throw(bar);
|
|
};
|
|
void foo::x() throw(bar)
|
|
{
|
|
if (!b) throw bar (static_cast<::N::X*>(this)); // ERROR - parse error
|
|
}
|