From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9076 invoked by alias); 27 Feb 2002 20:34:17 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8963 invoked from network); 27 Feb 2002 20:34:14 -0000 Received: from unknown (HELO localhost.localdomain) (66.60.148.227) by sources.redhat.com with SMTP; 27 Feb 2002 20:34:14 -0000 Received: from warlock.codesourcery.com (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id g1RKY3B01534 for ; Wed, 27 Feb 2002 12:34:04 -0800 Date: Wed, 27 Feb 2002 12:57:00 -0000 From: Mark Mitchell To: gcc@gcc.gnu.org Subject: PATCH: Tidy C++ testsuite Message-ID: <45910000.1014842043@warlock.codesourcery.com> X-Mailer: Mulberry/2.0.8 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-SW-Source: 2002-02/txt/msg01699.txt.bz2 Some time ago, we made the G++ testsuite start ignoring "instantiated from here" error lines since they change around with small perturbations in the compiler. However, we didn't remove the corresponding ERROR lines from old tests. This patch does that. Tested on i686-pc-linux-gnu by checking that test results before and after that change are identical. Committed to the mainline. -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com 2002-02-27 Mark Mitchell * g++.old-deja/g++.law/visibility13.C: Remove "instantiated from here" ERROR lines. * g++.old-deja/g++.oliva/partord1.C: Likewise. * g++.old-deja.g++.other/defarg1.C: Likewise. * g++.old-deja/g++.pt/calls2.C: Likewise. * g++.old-deja/g++.pt/crash20.C: Likewise. * g++.old-deja/g++.pt/crash30.C: Likewise. * g++.old-deja/g++.pt/crash36.C: Likewise. * g++.old-deja/g++.pt/crash6.C: Likewise. * g++.old-deja/g++.pt/defarg13.C: Likewise. * g++.old-deja/g++.pt/derived3.C: Likewise. * g++.old-deja/g++.pt/error1.C: Likewise. * g++.old-deja/g++.pt/friend21.C: Likewise. * g++.old-deja/g++.pt/friend23.C: Likewise. * g++.old-deja/g++.pt/infinite1.C: Likewise. * g++.old-deja/g++.robertl/eb128.C: Likewise. Index: g++.old-deja/g++.law/visibility13.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility13.C,v retrieving revision 1.7 diff -c -p -r1.7 visibility13.C *** visibility13.C 2001/04/06 22:05:08 1.7 --- visibility13.C 2002/02/27 19:58:33 *************** try_array( Array_RC &rc ) *** 99,105 **** int main() { static int ia[10] = { 12, 7, 14, 9, 128, 17, 6, 3, 27, 5 }; ! Array_RC iA(ia, 10);// ERROR - instantiated from here cout << "template Array_RC class" << endl; try_array(iA); --- 99,105 ---- int main() { static int ia[10] = { 12, 7, 14, 9, 128, 17, 6, 3, 27, 5 }; ! Array_RC iA(ia, 10); cout << "template Array_RC class" << endl; try_array(iA); Index: g++.old-deja/g++.oliva/partord1.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.oliva/partord1.C,v retrieving revision 1.2 diff -c -p -r1.2 partord1.C *** partord1.C 1999/09/04 15:09:04 1.2 --- partord1.C 2002/02/27 19:58:33 *************** template void foo(T*) { *** 23,28 **** int main() { int j = 0; foo(j); // calls foo(int), ok ! foo(&j); // calls foo(int*) // ERROR - not a friend foo(&j); // calls foo(int*), ok } --- 23,28 ---- int main() { int j = 0; foo(j); // calls foo(int), ok ! foo(&j); // calls foo(int*) foo(&j); // calls foo(int*), ok } Index: g++.old-deja/g++.other/defarg1.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.other/defarg1.C,v retrieving revision 1.2 diff -c -p -r1.2 defarg1.C *** defarg1.C 1999/09/04 15:09:05 1.2 --- defarg1.C 2002/02/27 19:58:33 *************** int j (T t) *** 24,28 **** return 0; } ! template int j (double); // ERROR - instantiated from here --- 24,28 ---- return 0; } ! template int j (double); Index: g++.old-deja/g++.pt/call2.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/call2.C,v retrieving revision 1.2 diff -c -p -r1.2 call2.C *** call2.C 1998/12/16 21:54:00 1.2 --- call2.C 2002/02/27 19:58:33 *************** for_each(const Field& p, IsCompressed, C *** 11,14 **** return p.IsCompressed(); // ERROR - calling type like a method } ! template bool for_each(const Field& p, IsCompressed, int); // ERROR - instantiated from here --- 11,14 ---- return p.IsCompressed(); // ERROR - calling type like a method } ! template bool for_each(const Field& p, IsCompressed, int); Index: g++.old-deja/g++.pt/crash20.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/crash20.C,v retrieving revision 1.2 diff -c -p -r1.2 crash20.C *** crash20.C 1998/12/16 21:54:18 1.2 --- crash20.C 2002/02/27 19:58:35 *************** struct A { const T x; A() : x(0) { } A(T *** 6,9 **** template void func () { B y; y = B(); } // ERROR - can't use default assignment ! int main (void) { func< A<> >(); } // ERROR - instantiated from here --- 6,9 ---- template void func () { B y; y = B(); } // ERROR - can't use default assignment ! int main (void) { func< A<> >(); } Index: g++.old-deja/g++.pt/crash30.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/crash30.C,v retrieving revision 1.2 diff -c -p -r1.2 crash30.C *** crash30.C 1999/09/04 15:09:07 1.2 --- crash30.C 2002/02/27 19:58:35 *************** template struct B { *** 12,15 **** friend void xxx(T); // ERROR - does not match any template }; ! template struct B; // ERROR - --- 12,15 ---- friend void xxx(T); // ERROR - does not match any template }; ! template struct B; Index: g++.old-deja/g++.pt/crash36.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/crash36.C,v retrieving revision 1.3 diff -c -p -r1.3 crash36.C *** crash36.C 2000/12/20 22:01:05 1.3 --- crash36.C 2002/02/27 19:58:35 *************** struct list { *** 32,35 **** (list_iterator(Head->next())); } }; ! template class list; // ERROR - instantiated from here --- 32,35 ---- (list_iterator(Head->next())); } }; ! template class list; Index: g++.old-deja/g++.pt/crash6.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/crash6.C,v retrieving revision 1.2 diff -c -p -r1.2 crash6.C *** crash6.C 1998/12/16 21:54:27 1.2 --- crash6.C 2002/02/27 19:58:35 *************** struct List *** 19,23 **** void test(List& vals) { ! vals.length(); // ERROR - instantiated from here } --- 19,23 ---- void test(List& vals) { ! vals.length(); } Index: g++.old-deja/g++.pt/defarg13.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/defarg13.C,v retrieving revision 1.2 diff -c -p -r1.2 defarg13.C *** defarg13.C 1999/09/04 15:09:07 1.2 --- defarg13.C 2002/02/27 19:58:35 *************** void f (int i) *** 6,13 **** { struct S { void g (int j = i) {} }; // ERROR - default argument uses local ! S s; // ERROR - instantiated here } ! template void f(int); // ERROR - instantiated here --- 6,13 ---- { struct S { void g (int j = i) {} }; // ERROR - default argument uses local ! S s; } ! template void f(int); Index: g++.old-deja/g++.pt/derived3.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/derived3.C,v retrieving revision 1.2 diff -c -p -r1.2 derived3.C *** derived3.C 1999/09/04 15:09:07 1.2 --- derived3.C 2002/02/27 19:58:35 *************** *** 2,8 **** // crash test - // by Paul Burchard , Level Set Systems, Inc. ! // Copyright (C) 1999 Free Software Foundation template class X { --- 2,8 ---- // crash test - // by Paul Burchard , Level Set Systems, Inc. ! // Copyright (C) 1999, 2002 Free Software Foundation template class X { *************** class X { *** 10,15 **** Y y; }; int main() { ! X x; // ERROR - (instantiated from here) } --- 10,15 ---- Y y; }; int main() { ! X x; } Index: g++.old-deja/g++.pt/error1.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/error1.C,v retrieving revision 1.1 diff -c -p -r1.1 error1.C *** error1.C 1999/09/29 17:24:21 1.1 --- error1.C 2002/02/27 19:58:35 *************** void S::f () *** 16,19 **** U& u; // ERROR - uninitialized reference } ! template void S::f(); // ERROR - instantiated from here --- 16,19 ---- U& u; // ERROR - uninitialized reference } ! template void S::f(); Index: g++.old-deja/g++.pt/friend21.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/friend21.C,v retrieving revision 1.4 diff -c -p -r1.4 friend21.C *** friend21.C 1999/03/09 23:02:09 1.4 --- friend21.C 2002/02/27 19:58:35 *************** void A::f() *** 27,30 **** B::i = 3; // ERROR - member `i' is private } ! template void A::f(); // ERROR - instantiated from here --- 27,30 ---- B::i = 3; // ERROR - member `i' is private } ! template void A::f(); Index: g++.old-deja/g++.pt/friend23.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/friend23.C,v retrieving revision 1.3 diff -c -p -r1.3 friend23.C *** friend23.C 1998/12/16 21:56:32 1.3 --- friend23.C 2002/02/27 19:58:35 *************** struct S *** 7,10 **** friend class S; }; ! template struct S; // ERROR - instantiated from here --- 7,10 ---- friend class S; }; ! template struct S; Index: g++.old-deja/g++.pt/infinite1.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.pt/infinite1.C,v retrieving revision 1.3 diff -c -p -r1.3 infinite1.C *** infinite1.C 2002/01/10 21:03:45 1.3 --- infinite1.C 2002/02/27 19:58:35 *************** template <> void f<11>(); *** 16,20 **** int main() { ! f<0>(); // ERROR - starting here } --- 16,20 ---- int main() { ! f<0>(); } Index: g++.old-deja/g++.robertl/eb128.C =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb128.C,v retrieving revision 1.3 diff -c -p -r1.3 eb128.C *** eb128.C 1998/12/16 22:03:20 1.3 --- eb128.C 2002/02/27 19:58:35 *************** public: *** 7,11 **** void f() { ! A a; // ERROR - instantiated from here } --- 7,11 ---- void f() { ! A a; }