Commit 72ca2dee by Neil Booth Committed by Neil Booth

virtual9.C: New test.

	* g++.old-deja/g++.other/virtual9.C: New test.
	* g++.old-deja/g++.pt/crash61.C: New test.
	* gcc.c-torture/execute/loop-9.c: New test.

From-SVN: r38019
parent a67ded0f
2000-12-04 Neil Booth <neilb@earthling.net>
* g++.old-deja/g++.other/virtual9.C: New test.
* g++.old-deja/g++.pt/crash61.C: New test.
* gcc.c-torture/execute/loop-9.c: New test.
2000-12-04 Neil Booth <neilb@earthling.net>
* g++.old-deja/g++.other/instan1.C, instan2.C: Move to...
* g++.old-deja/g++.pt/instantiate1.C, instantiate2.C: ...here.
* gcc.dg/cpp/19960224-2.c, endif.c, if-6.c: Move into...
......
// Source: Neil Booth, from PR #111.
class A
{
public :
int i;
};
class B : virtual public A
{
};
class C : virtual public A
{
};
class D : public B, public C
{
public :
int f(void);
int g(void);
};
int D::f(void)
{
return B::i;
}
int D::g(void)
{
return this->B::i;
}
D d;
extern "C" void abort (void);
int main(void)
{
d.C::i=325;
if (d.f() != d.B::i || d.f() != d.g())
abort ();
return 0;
}
// Build don't link:
// Source: Neil Booth, from PR # 106. 4 Dec 2000.
template <bool b> class bar
{
};
class A_a
{
public:
static const bool b = true;
};
class B_b
{
public:
static const bool b = false;
};
template <class A, class B> class foo
{
};
template <class A, class B>
bar<(A::b || B::b)> do_funky(const foo<A, B>&);
int main()
{
bar<true> a_bar = do_funky(foo<A_a, B_b>());
}
/* Source: Neil Booth, from PR # 115. */
int false()
{
return 0;
}
extern void abort (void);
int main (int argc,char *argv[])
{
int count = 0;
while (false() || count < -123)
++count;
if (count)
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment