From 41dc48164709a719eb1ee4191afa302fe557163c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 3 Apr 2001 08:38:45 +0000 Subject: [PATCH] instantiate1.C: Adjust to accommodate peculiarities of the SH. * g++.old-deja/g++.ext/instantiate1.C: Adjust to accommodate peculiarities of the SH. * g++.old-deja/g++.ext/instantiate2.C: Likewise. From-SVN: r41045 --- gcc/testsuite/ChangeLog | 7 +++++- .../g++.old-deja/g++.ext/instantiate1.C | 22 ++++++++++++++----- .../g++.old-deja/g++.ext/instantiate2.C | 15 +++++++++---- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bd6039fb031..c72d2def208 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2001-04-03 Alexandre Oliva + + * g++.old-deja/g++.ext/instantiate1.C: Adjust to accommodate + peculiarities of the SH. + * g++.old-deja/g++.ext/instantiate2.C: Likewise. + 2001-04-02 Rainer Orth * gcc.c-torture/execute/ieee/fp-cmp-1.c: Renamed nan to dnan. @@ -210,7 +216,6 @@ * g++.old-deja/g++.pt/overload15.C: New test to stress overloaded templatized constructors. ->>>>>>> 1.1119 2001-02-24 Franz Sirl * gcc.c-torture/execute/20010224-1.c: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C b/gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C index 8d5457f5944..8e0fbe073fd 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/instantiate1.C @@ -13,12 +13,22 @@ template struct A { template void A::f () { } extern template struct A; +// These functions must be defined in a single line, so that, even if +// constants or pointers are placed in the code section (for example, +// on the SH), we still get the same line numbers. + +void test_f_int () { f(42); } // ERROR - not instantiated + +void test_A_int_f () { A a; a.f (); } // ERROR - not instantiated + +void test_f_double () { f (2.0); } // gets bogus error + +void test_A_double_f () { A b; b.f (); } // gets bogus error + int main () { - f (42); // ERROR - not instantiated - A a; - a.f (); // ERROR - not instantiated - f (2.0); // gets bogus error - A b; - b.f (); // gets bogus error + test_f_int (); + test_A_int_f (); + test_f_double (); + test_A_double_f (); } diff --git a/gcc/testsuite/g++.old-deja/g++.ext/instantiate2.C b/gcc/testsuite/g++.old-deja/g++.ext/instantiate2.C index 0b3dc24ea4c..9a783a14b63 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/instantiate2.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/instantiate2.C @@ -10,10 +10,17 @@ template struct A { template T A::t = 0; static template struct A; +// These functions must be defined in a single line, so that, even if +// constants or pointers are placed in the code section (for example, +// on the SH), we still get the same line numbers. + +void test_int() { A::t = 42; } // gets bogus error + +void test_char() { A::t = 42; } // ERROR - not instantiated XFAIL *-*-irix* +// Irix's default linker does not produce line numbers so XFAIL it. + int main () { - A::t = 42; // gets bogus error - A::t = 42; // ERROR - not instantiated XFAIL mips*-*-* - // Irix's default linker does not - // produce line numbers so XFAIL it. + test_int (); + test_char (); } -- 2.30.2