From 62043cea9be30a598a465fca88c46df26546ecda Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 12 Apr 2000 12:55:06 +0000 Subject: [PATCH] Add workaround for gcc-2.95.2 failure. --- ld/testsuite/ChangeLog | 2 ++ ld/testsuite/ld-selective/3.cc | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 89f94ff3e7..c07f18eb48 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2000-04-12 Alan Modra + * ld-selective/3.cc (_start): Add cheat for gcc-2.95.2 failure. + * ld-selective/selective.exp (test4): Test for presence of foo__1B, not absence. Also check for foo__1A and _start. White space changes throughout file. diff --git a/ld/testsuite/ld-selective/3.cc b/ld/testsuite/ld-selective/3.cc index 852bc5d045..79d5e96b7f 100644 --- a/ld/testsuite/ld-selective/3.cc +++ b/ld/testsuite/ld-selective/3.cc @@ -5,7 +5,7 @@ struct A }; void A::foo() { } // keep -void A::bar() { } // loose +void A::bar() { } // lose struct B : public A { @@ -23,6 +23,13 @@ A *getme() { return &a; } // keep void _start() { getme()->foo(); +#ifdef __GNUC__ +#if (__GNUC__ == 2 && __GNUC_MINOR__ < 96) +// gcc-2.95.2 gets this test wrong, and loses B::foo(). +// Cheat. After all, we aren't trying to test the compiler here. + b.foo(); +#endif +#endif } // In addition, keep A's virtual table. -- 2.34.1