This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Tidy C++ testsuite


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  <mark@codesourcery.com>

	* 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<Type> &rc )
*** 99,105 ****
  int main()
  {
      static int ia[10] = { 12, 7, 14, 9, 128, 17, 6, 3, 27, 5 };
!     Array_RC<int> 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<int> 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 <typename T> void foo(T*) {
*** 23,28 ****
  int main() {
    int j = 0;
    foo(j); // calls foo<int>(int), ok
!   foo(&j); // calls foo<int>(int*) // ERROR - not a friend
    foo<int*>(&j); // calls foo<int*>(int*), ok
  }
--- 23,28 ----
  int main() {
    int j = 0;
    foo(j); // calls foo<int>(int), ok
!   foo(&j); // calls foo<int>(int*)
    foo<int*>(&j); // calls foo<int*>(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<int>(const Field& p, IsCompressed, int); // ERROR 
- instantiated from here
--- 11,14 ----
    return p.IsCompressed(); // ERROR - calling type like a method
  }

! template bool for_each<int>(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 <class B>
  void func () { B y; y = B(); } // ERROR - can't use default assignment

! int main (void) { func< A<> >(); } // ERROR - instantiated from here
--- 6,9 ----
  template <class B>
  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 <class T> struct B {
*** 12,15 ****
    friend void xxx<T>(T); // ERROR - does not match any template
  };

! template struct B<double>; // ERROR -
--- 12,15 ----
    friend void xxx<T>(T); // ERROR - does not match any template
  };

! template struct B<double>;
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<T>(Head->next())); }
  };

! template class list<int>; // ERROR - instantiated from here
--- 32,35 ----
  	(list_iterator<T>(Head->next())); }
  };

! template class list<int>;
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<int>& vals)
  {
!   vals.length();  // ERROR - instantiated from here
  }
--- 19,23 ----

  void test(List<int>& 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<double>(int); // ERROR - instantiated here

--- 6,13 ----
  {
    struct S { void g (int j = i) {} }; // ERROR - default argument uses 
local

!   S s;
  }

! template void f<double>(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 <burchard@pobox.com>, Level Set Systems, Inc.
! // Copyright (C) 1999 Free Software Foundation

  template<class T>
  class X {
--- 2,8 ----
  // crash test -

  // by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
! // Copyright (C) 1999, 2002 Free Software Foundation

  template<class T>
  class X {
*************** class X {
*** 10,15 ****
  	Y y;
  };
  int main() {
! 	X<int> x; // ERROR - (instantiated from here)
  }

--- 10,15 ----
  	Y y;
  };
  int main() {
! 	X<int> 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<T>::f ()
*** 16,19 ****
    U& u; // ERROR - uninitialized reference
  }

! template void S<int>::f<double>(); // ERROR - instantiated from here
--- 16,19 ----
    U& u; // ERROR - uninitialized reference
  }

! template void S<int>::f<double>();
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<T>::f()
*** 27,30 ****
    B<double>::i = 3; // ERROR - member `i' is private
  }

! template void A<int>::f(); // ERROR - instantiated from here
--- 27,30 ----
    B<double>::i = 3; // ERROR - member `i' is private
  }

! template void A<int>::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<int>; // ERROR - instantiated from here
--- 7,10 ----
    friend class S;
  };

! template struct S<int>;
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<int&> a; // ERROR - instantiated from here
  }
--- 7,11 ----

  void f()
  {
!   A<int&> a;
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]