This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Testsuite fixes
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Dec 2001 10:34:00 -0800 (PST)
- Subject: [patch] Testsuite fixes
Back in June I sent a patch for some g++ test suites which reference but
never define functions. These tests fail on HP-UX where
ASM_OUTPUT_EXTERNAL is defined and an external declaration is created
when a function is referenced (but is unresolved because the function is
never defined).
Could someone look at these and check them in? I do not have write
permission to CVS.
Steve Ellcey
sje@cup.hp.com
(Original mail from June)
I have six tests that fail on my platform (IA64 HP-UX) due to undefined
functions. In each case there is a reference to a function but no use
of it. This is not a problem on platforms where ASM_OUTPUT_EXTERNAL is
undefined but can generate errors on systems where it is defined because
ASM_OUTPUT_EXTERNAL may put out a "global" asm statement and cause the
linker to generate an "unsatisfied symbol" error. The test will then
fail the "test for excess errors".
These are similar to the testsuite/g++.old-deja/g++.pt/ptrmem2.C that I
already submitted and hopefully comprise all the test programs with this
type of error.
If someone could verify them and check them in that would be great,
I have no write access (but do have a copyright assignment on file).
Steve Ellcey
sje@cup.hp.com
2001-06-19 Steve Ellcey <sje@cup.hp.com>
* testsuite/g++.old-deja/g++.benjamin/14687.C: Define function
that is referenced but never defined.
* testsuite/g++.old-deja/g++.jason/temporary4.C: Likewise.
* testsuite/g++.old-deja/g++.jason/typeid1.C: Likewise.
* testsuite/g++.old-deja/g++.other/dtor8.C: Likewise.
* testsuite/g++.old-deja/g++.other/static14.C: Likewise.
* testsuite/g++.old-deja/g++.other/sizeof3.C: Make abort "extern C".
*** testsuite/g++.old-deja/g++.benjamin/14687.C.orig Tue Jun 19 08:47:30 2001
--- testsuite/g++.old-deja/g++.benjamin/14687.C Mon Jun 18 16:16:53 2001
*************** struct dominica: belieze {
*** 20,25 ****
--- 20,29 ----
void g(int i) { g('c'); } // recursively calls dominca::g(int)
};
+ void belieze::f(char) {
+ assert (0);
+ };
+
// p 6
namespace A {
*** testsuite/g++.old-deja/g++.jason/temporary4.C.orig Tue Jun 19 08:47:30 2001
--- testsuite/g++.old-deja/g++.jason/temporary4.C Tue Jun 19 08:41:03 2001
*************** int r = 0;
*** 8,14 ****
struct A {
A() { if (c != d) r = 1; ++c; }
! A(const A&); // declare so g++ returns A on the stack
~A() { ++d; }
operator int () { return 0; }
};
--- 8,14 ----
struct A {
A() { if (c != d) r = 1; ++c; }
! A(const A&) {}; // declare so g++ returns A on the stack
~A() { ++d; }
operator int () { return 0; }
};
*** testsuite/g++.old-deja/g++.jason/typeid1.C.orig Tue Jun 19 08:47:30 2001
--- testsuite/g++.old-deja/g++.jason/typeid1.C Mon Jun 18 15:31:47 2001
***************
*** 3,8 ****
--- 3,11 ----
struct foo { double f(int); };
+ double f (int i) {return i;};
+ double foo::f (int i) {return i;};
+
int main() {
double f (int);
const std::type_info &r = typeid (f);
*** testsuite/g++.old-deja/g++.other/dtor8.C.orig Tue Jun 19 08:47:30 2001
--- testsuite/g++.old-deja/g++.other/dtor8.C Tue Jun 19 08:42:24 2001
*************** S::S ()
*** 20,25 ****
--- 20,29 ----
s = this;
}
+ S::S(S const &x)
+ {
+ };
+
S::~S ()
{
if (s != this)
*** testsuite/g++.old-deja/g++.other/sizeof3.C.orig Tue Jun 19 08:47:30 2001
--- testsuite/g++.old-deja/g++.other/sizeof3.C Mon Jun 18 15:33:48 2001
***************
*** 5,11 ****
// means things like the rhs of a comma operator mustn't decay. This will make
// a difference if it is an array or function.
! extern void abort();
int main (int argc, char **argv)
{
--- 5,11 ----
// means things like the rhs of a comma operator mustn't decay. This will make
// a difference if it is an array or function.
! extern "C" {void abort();}
int main (int argc, char **argv)
{
*** testsuite/g++.old-deja/g++.other/static14.C.orig Tue Jun 19 08:47:30 2001
--- testsuite/g++.old-deja/g++.other/static14.C Mon Jun 18 15:38:30 2001
*************** struct basic_string
*** 6,11 ****
--- 6,15 ----
~basic_string();
};
+ basic_string::~basic_string()
+ {
+ };
+
struct Side
{
void name()