This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Support ``make check-g++'' with libstdc++-v3 (1 of N)
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Support ``make check-g++'' with libstdc++-v3 (1 of N)
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Fri, 12 May 2000 02:59:01 -0500 (CDT)
- Reply-to: rittle at rsch dot comm dot mot dot com
As was suggested by Martin v. Loewis, here is the first patch, which
is only a portion of those required, to better support ``make
check-g++'' when the gcc tree is configured to use libstdc++-v3.
Reran ``make check-g++'' in already built trees on
i686-unknown-freebsdelf3.4 configured with and without
--enable-libstdcxx-v3.
Only positive results seen in tree configured with --enable-libstdcxx-v3.
However, one ICE regression is seen in the tree configured without
--enable-libstdcxx-v3:
FAIL: g++.robertl/eb129.C caused compiler crash
Perhaps, given the fragile nature of the problem being detected by
eb129.C (or this ICE could be something entirely different I suppose),
it needs to stay as is but disabled when linking against libstdc++-v3
(best to key off of __STL_USE_NAMESPACES macro?). And then eb129b.C
should be added. It would be a copy of eb129.C with the patch
included here applied.
2000-05-11 Loren J. Rittle <ljrittle@acm.org>
* g++.old-deja/g++.brendan/crash20.C: Fix (lack of) namespace std usage.
* g++.old-deja/g++.brendan/crash30.C: Likewise.
* g++.old-deja/g++.martin/bitset1.C: Likewise.
* g++.old-deja/g++.robertl/eb21.C: Likewise.
* g++.old-deja/g++.robertl/eb109.C: Likewise.
* g++.old-deja/g++.robertl/eb127.C: Likewise.
* g++.old-deja/g++.robertl/eb129.C: Likewise.
* g++.old-deja/g++.robertl/eb132.C: Likewise.
* g++.old-deja/g++.jason/template31.C: Handle more libstdc++
configurations.
Index: g++.old-deja/g++.brendan/crash20.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C,v
retrieving revision 1.3
diff -p -r1.3 crash20.C
*** crash20.C 1998/12/16 21:23:31 1.3
--- crash20.C 2000/05/12 06:31:41
***************
*** 1,7 ****
// Build don't link:
// GROUPS passed old-abort
#include <complex>
! typedef complex<double> Complex;
Complex ComputeVVself()
{
--- 1,7 ----
// Build don't link:
// GROUPS passed old-abort
#include <complex>
! typedef std::complex<double> Complex;
Complex ComputeVVself()
{
Index: g++.old-deja/g++.brendan/crash30.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C,v
retrieving revision 1.4
diff -p -r1.4 crash30.C
*** crash30.C 1998/12/16 21:23:42 1.4
--- crash30.C 2000/05/12 06:31:41
***************
*** 5,10 ****
int
main(void) {
! string a[] = {"Hello"};
}
--- 5,10 ----
int
main(void) {
! std::string a[] = {"Hello"};
}
Index: g++.old-deja/g++.martin/bitset1.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.martin/bitset1.C,v
retrieving revision 1.1
diff -p -r1.1 bitset1.C
*** bitset1.C 1999/11/07 00:10:31 1.1
--- bitset1.C 2000/05/12 06:31:41
***************
*** 3,9 ****
int main()
{
! bitset<sizeof(int) * 8> bufWord;
bufWord[3] = 0;
}
--- 3,9 ----
int main()
{
! std::bitset<sizeof(int) * 8> bufWord;
bufWord[3] = 0;
}
Index: g++.old-deja/g++.robertl/eb109.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C,v
retrieving revision 1.6
diff -p -r1.6 eb109.C
*** eb109.C 1999/06/03 07:16:15 1.6
--- eb109.C 2000/05/12 06:31:41
*************** class Graph
*** 20,28 ****
{ // ERROR - candidates
public:
// public type interface
! typedef map<int, EdgeType > Successor;
! typedef pair<VertexType, Successor> vertex;
! typedef vector<vertex> GraphType;
typedef typename GraphType::iterator iterator;
typedef typename GraphType::const_iterator const_iterator;
--- 20,28 ----
{ // ERROR - candidates
public:
// public type interface
! typedef std::map<int, EdgeType > Successor;
! typedef std::pair<VertexType, Successor> vertex;
! typedef std::vector<vertex> GraphType;
typedef typename GraphType::iterator iterator;
typedef typename GraphType::const_iterator const_iterator;
*************** ostream& operator<<(ostream& os, Graph<V
*** 62,68 ****
int main()
{
// no edge weighting, therefore type Empty:
! Graph<string, Empty> V(true); // ERROR - no bool constructor
// ReadGraph(V, "gra1.dat");
// display of vertices with successors
--- 62,68 ----
int main()
{
// no edge weighting, therefore type Empty:
! Graph<std::string, Empty> V(true); // ERROR - no bool constructor
// ReadGraph(V, "gra1.dat");
// display of vertices with successors
Index: g++.old-deja/g++.robertl/eb127.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C,v
retrieving revision 1.5
diff -p -r1.5 eb127.C
*** eb127.C 2000/04/20 06:54:02 1.5
--- eb127.C 2000/05/12 06:31:41
***************
*** 2,23 ****
#include <vector>
#include<string>
using namespace std;
class ODEsolver
{
private:
! void eulerODE(vector<double>& y, double& t, double& dt);
! void midpointODE(vector<double>& y, double& t, double& dt);
protected:
! void (ODEsolver::*useMethod)(vector<double>&, double&, double&);
void init();
public:
ODEsolver();
! void timeloop(vector<double>& y, double ts, double te, double dt);
};
--- 2,24 ----
#include <vector>
#include<string>
+ #include<iostream>
using namespace std;
class ODEsolver
{
private:
! void eulerODE(std::vector<double>& y, double& t, double& dt);
! void midpointODE(std::vector<double>& y, double& t, double& dt);
protected:
! void (ODEsolver::*useMethod)(std::vector<double>&, double&, double&);
void init();
public:
ODEsolver();
! void timeloop(std::vector<double>& y, double ts, double te, double dt);
};
*************** ODEsolver::ODEsolver()
*** 27,38 ****
}
! void ODEsolver::eulerODE(vector<double>& y, double& t, double& dt)
{
y[0] = dt * 2.;
}
! void ODEsolver::midpointODE(vector<double>& y, double& t, double& dt)
{
y[0] = dt * 3.;
}
--- 28,39 ----
}
! void ODEsolver::eulerODE(std::vector<double>& y, double& t, double& dt)
{
y[0] = dt * 2.;
}
! void ODEsolver::midpointODE(std::vector<double>& y, double& t, double& dt)
{
y[0] = dt * 3.;
}
*************** void ODEsolver::timeloop(vector<double>&
*** 52,59 ****
int main (int nargs, char** args)
{
ODEsolver solver;
! vector<double> y(2); double t_start=5.; double t_end=7.; double dt=2.;
solver.timeloop(y,t_start,t_end,dt);
! cout << y[0] << endl;
return(0);
}
--- 53,60 ----
int main (int nargs, char** args)
{
ODEsolver solver;
! std::vector<double> y(2); double t_start=5.; double t_end=7.; double dt=2.;
solver.timeloop(y,t_start,t_end,dt);
! std::cout << y[0] << std::endl;
return(0);
}
Index: g++.old-deja/g++.robertl/eb129.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C,v
retrieving revision 1.3
diff -p -r1.3 eb129.C
*** eb129.C 1998/12/16 22:03:21 1.3
--- eb129.C 2000/05/12 06:31:41
***************
*** 8,22 ****
#include <cassert>
int main()
{
! list<int> l;
l.push_back(1);
l.push_back(2);
! list<int>::iterator it =
! find_if( l.begin(), l.end(),
// This is a typo, it should be bind2nd, but an
// ICE is not a very helpful diagnostic!
! binder2nd( equal_to<int>(), 2 ) ); // ERROR -
assert( *(it) == 2 );
}
--- 8,22 ----
#include <cassert>
int main()
{
! std::list<int> l;
l.push_back(1);
l.push_back(2);
! std::list<int>::iterator it =
! std::find_if( l.begin(), l.end(),
// This is a typo, it should be bind2nd, but an
// ICE is not a very helpful diagnostic!
! std::binder2nd( std::equal_to<int>(), 2 ) ); // ERROR -
assert( *(it) == 2 );
}
Index: g++.old-deja/g++.robertl/eb132.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C,v
retrieving revision 1.5
diff -p -r1.5 eb132.C
*** eb132.C 1998/12/16 22:03:26 1.5
--- eb132.C 2000/05/12 06:31:41
*************** struct a {
*** 16,22 ****
void bar();
enum b { c, d };
b theb;
! string baz;
};
void
--- 16,22 ----
void bar();
enum b { c, d };
b theb;
! std::string baz;
};
void
Index: g++.old-deja/g++.robertl/eb21.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C,v
retrieving revision 1.2
diff -p -r1.2 eb21.C
*** eb21.C 1998/12/16 22:03:37 1.2
--- eb21.C 2000/05/12 06:31:41
*************** struct connection_t {
*** 8,14 ****
connection_t() {}
};
! vector<connection_t> connections;
/*----------------------------------------*/
--- 8,14 ----
connection_t() {}
};
! std::vector<connection_t> connections;
/*----------------------------------------*/
Index: g++.old-deja/g++.jason/template31.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.jason/template31.C,v
retrieving revision 1.4
diff -p -r1.4 template31.C
*** template31.C 1998/12/16 21:37:33 1.4
--- template31.C 2000/05/12 06:31:41
*************** int main(int argc, char**argv) {
*** 37,40 ****
--- 37,42 ----
}
template class std::__malloc_alloc_template<0>;
+ #ifndef __USE_MALLOC
template class std::__default_alloc_template<false, 0>;
+ #endif