From b6972575d4f3f18ef0e2c15411d563a1a8473898 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Mon, 4 Dec 2000 22:51:59 +0000 Subject: instan1.C, instan2.C: Move to... * g++.old-deja/g++.other/instan1.C, instan2.C: Move to... * g++.old-deja/g++.pt/instantiate1.C, instantiate2.C: ...here. * gcc.dg/cpp/19960224-2.c, endif.c, if-6.c: Move into... * gcc.dg/cpp/extratokens.c: ...here. From-SVN: r38013 --- gcc/testsuite/ChangeLog | 7 +++ gcc/testsuite/g++.old-deja/g++.other/instan2.C | 15 ------ gcc/testsuite/g++.old-deja/g++.other/instan3.C | 65 ----------------------- gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C | 15 ++++++ gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C | 65 +++++++++++++++++++++++ gcc/testsuite/gcc.dg/cpp/19960224-2.c | 6 --- gcc/testsuite/gcc.dg/cpp/endif.c | 15 ------ gcc/testsuite/gcc.dg/cpp/if-6.c | 3 -- 8 files changed, 87 insertions(+), 104 deletions(-) delete mode 100644 gcc/testsuite/g++.old-deja/g++.other/instan2.C delete mode 100644 gcc/testsuite/g++.old-deja/g++.other/instan3.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C delete mode 100644 gcc/testsuite/gcc.dg/cpp/19960224-2.c delete mode 100644 gcc/testsuite/gcc.dg/cpp/endif.c delete mode 100644 gcc/testsuite/gcc.dg/cpp/if-6.c (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a4ed215..ba166ad 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2000-12-04 Neil Booth + * g++.old-deja/g++.other/instan1.C, instan2.C: Move to... + * g++.old-deja/g++.pt/instantiate1.C, instantiate2.C: ...here. + * gcc.dg/cpp/19960224-2.c, endif.c, if-6.c: Move into... + * gcc.dg/cpp/extratokens.c: ...here. + +2000-12-04 Neil Booth + * gcc.dg/cpp/assert_trad1.c, assert_trad2.c, assert_trad3.c: New tests. diff --git a/gcc/testsuite/g++.old-deja/g++.other/instan2.C b/gcc/testsuite/g++.old-deja/g++.other/instan2.C deleted file mode 100644 index 822de9e..0000000 --- a/gcc/testsuite/g++.old-deja/g++.other/instan2.C +++ /dev/null @@ -1,15 +0,0 @@ -// Build don't link: -// Origin: Neil Booth, from bug report #44 - -#include - -template -struct X -{ -}; - -template -X operator+(const X&, const X&); - -template<> -X operator+(const X&, const X&); diff --git a/gcc/testsuite/g++.old-deja/g++.other/instan3.C b/gcc/testsuite/g++.old-deja/g++.other/instan3.C deleted file mode 100644 index ae53224..0000000 --- a/gcc/testsuite/g++.old-deja/g++.other/instan3.C +++ /dev/null @@ -1,65 +0,0 @@ -// Build don't link: -// Origin: Neil Booth, from bug report #36 - -template class vect; -template vect operator-( const vect&, const vect& ); - -template -class vect -{ -public: - vect( t a ); - - vect( const vect& v ); - ~vect(); - - vect& operator=( const vect& v ); - vect operator-( void ) const; - friend vect operator- <>( const vect&, const vect& ); - -private: - t a_; -}; - -template inline -vect::vect( t a ) -: a_(a) -{ -} - -template inline -vect::vect( const vect& v ) -: a_(v.a_) -{ -} - -template inline -vect::~vect() -{ -} - -template inline vect& -vect::operator=( const vect& v ) -{ - a_ = v.a_; - return *this; -} - -template inline vect -vect::operator-( void ) const -{ - return vect( -a_ ); -} - -template inline vect -operator-( const vect& u, const vect& v ) -{ - return vect( u.a_ - v.a_ ); -} - -int -main( void ) -{ - vect a( 1.0 ), b( 0.0 ); - b = -a; -} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C new file mode 100644 index 0000000..822de9e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate10.C @@ -0,0 +1,15 @@ +// Build don't link: +// Origin: Neil Booth, from bug report #44 + +#include + +template +struct X +{ +}; + +template +X operator+(const X&, const X&); + +template<> +X operator+(const X&, const X&); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C new file mode 100644 index 0000000..ae53224 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate11.C @@ -0,0 +1,65 @@ +// Build don't link: +// Origin: Neil Booth, from bug report #36 + +template class vect; +template vect operator-( const vect&, const vect& ); + +template +class vect +{ +public: + vect( t a ); + + vect( const vect& v ); + ~vect(); + + vect& operator=( const vect& v ); + vect operator-( void ) const; + friend vect operator- <>( const vect&, const vect& ); + +private: + t a_; +}; + +template inline +vect::vect( t a ) +: a_(a) +{ +} + +template inline +vect::vect( const vect& v ) +: a_(v.a_) +{ +} + +template inline +vect::~vect() +{ +} + +template inline vect& +vect::operator=( const vect& v ) +{ + a_ = v.a_; + return *this; +} + +template inline vect +vect::operator-( void ) const +{ + return vect( -a_ ); +} + +template inline vect +operator-( const vect& u, const vect& v ) +{ + return vect( u.a_ - v.a_ ); +} + +int +main( void ) +{ + vect a( 1.0 ), b( 0.0 ); + b = -a; +} diff --git a/gcc/testsuite/gcc.dg/cpp/19960224-2.c b/gcc/testsuite/gcc.dg/cpp/19960224-2.c deleted file mode 100644 index 799382c..0000000 --- a/gcc/testsuite/gcc.dg/cpp/19960224-2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do preprocess } */ - -#if 0 -#if 0 -#endif / /* { dg-warning "extra tokens" "extra tokens after #endif" } */ -#endif diff --git a/gcc/testsuite/gcc.dg/cpp/endif.c b/gcc/testsuite/gcc.dg/cpp/endif.c deleted file mode 100644 index e6fd4b9..0000000 --- a/gcc/testsuite/gcc.dg/cpp/endif.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do preprocess } */ -/* { dg-options "-pedantic -Wall" } */ - -/* You can't get away with this in your own code... */ -#ifdef KERNEL -#define foo -#endif KERNEL /* { dg-warning "extra tokens" "good warning" } */ - -/* This will provoke a warning because the '3' is an extension. */ -#line 10 "endif-label.c" 3 /* { dg-warning "extra tokens" "#line extension" } */ - -/* ... but in a system header, it's acceptable. */ -#ifdef KERNEL -#define foo -#endif KERNEL /* { dg-bogus "extra tokens" "bad warning" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/if-6.c b/gcc/testsuite/gcc.dg/cpp/if-6.c deleted file mode 100644 index 1f23d2c..0000000 --- a/gcc/testsuite/gcc.dg/cpp/if-6.c +++ /dev/null @@ -1,3 +0,0 @@ -/* { dg-do preprocess } */ -#ifdef foo bar /* { dg-error "extra tokens" "tokens after #ifdef" } */ -#endif -- cgit v1.1