This is the mail archive of the gcc-bugs@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]

Bug report


Gentlemen,
I have just got the following message:


make -k
gcc -c -Wreturn-type -Wall -fexceptions -Wconversion -pedantic -Woverloaded-virtual  inst.cc -o inst.o
inst.cc:42: Internal compiler error 892.
inst.cc:42: Please submit a full bug report to `egcs-bugs@cygnus.com'.
make: *** [inst.o] Error 1
make: Target `all' not remade because of errors.

Compilation exited abnormally with code 2 at Mon Oct 12 21:28:40

While trying to compile the following file - this is a whole bunch of template instantiations:

// inst.cc

#include "network.h"
#include <algo.h>
#include "node.h"
#include <vector.h>

template Node *
 __uninitialized_fill_n_aux<Node *, unsigned int, Node>(Node *, 
							unsigned int,
							Node const &,
							__false_type);

template void
vector<vector<Node, __default_alloc_template<false, 0> >, __default_alloc_template<false, 0> >::insert_aux(vector<Node, __default_alloc_template<false, 0> > *, vector<Node, __default_alloc_template<false, 0> > const &);


template Node *
 __uninitialized_copy_aux<Node const *, Node *>(Node const *,
						Node const *,
						Node *,
						__false_type);

template int * fill_n<int *, unsigned int, int>(int *, unsigned int, int const &);

template void
vector<vector<double, __default_alloc_template<false, 0> >, __default_alloc_template<false, 0> >::insert_aux(vector<double, __default_alloc_template<false, 0> > *, vector<double, __default_alloc_template<false, 0> > const &);

template void
vector<double, __default_alloc_template<false, 0> >::insert_aux(double *, double const &);

template void
vector<Weight, __default_alloc_template<false, 0> >::insert_aux(Weight *, Weight const &);

template vector<double, __default_alloc_template<false, 0> > *
 __uninitialized_copy_aux<vector<double, __default_alloc_template<false, 0> > const *, vector<double, __default_alloc_template<false, 0> > *>(vector<double, __default_alloc_template<false, 0> > const *, vector<double, __default_alloc_template<false, 0> > const *, vector<double, __default_alloc_template<false, 0> > *, __false_type);

template void evaluate<Logistic>(Network&);

template double inner_product<Node *, double *, double>(Node *, Node *, double *, double);

template void Network::evaluate_network<Logistic>();


Now network.h is:

#ifndef _NETWORK_H
#define _NETWORK_H

#include "node.h"
#include "weight.h"
#include <vector.h>


class Network
{
public:
  Network(vector<int> layer_sizes);
  void test();
  template<class Evaluator> void evaluate_network();
  virtual ~Network() {};
protected:

private:
  void _link(int from, int to);
  vector<vector<Node> > _layers;
  vector<Weight> _weights;
};

template<class Evaluator> void evaluate(Network & network)
{
  Evaluator evaluator;
  cout << __PRETTY_FUNCTION__ << evaluator(1.0) << endl;
};

#endif

This is part of my attempt to teah myself STL and get a neural network program going at the same time.   I downloaded EGCS 1.1 & the g++ library, a few days ago, so I guess I am running the latest version.

Any help would be appreciated.



Regards,


Simon Craser



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